#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Fri, 11 May 2018 10:15:09 +0200
changeset 4255 6ff79c868b94
parent 4254 3fe3c5bbe84e
child 4256 5152078ff118
#BUGFIX by stefan class: ParserFlags class changed: #initialize https://expeccoalm.exept.de/D252306 Das Problem ist, dass glibc includes abhängig von der gcc-Version (7.x) vesrchiedenen code includiert Bisher wurde in der Kommandozeile '-D__GNUC__' redefiniert, und damit die darin vorhandene gcc-Version entfernt. gcc definiert aber automatisch von sich aus __GNUC__.
ParserFlags.st
--- a/ParserFlags.st	Fri May 11 10:14:06 2018 +0200
+++ b/ParserFlags.st	Fri May 11 10:15:09 2018 +0200
@@ -3,7 +3,7 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
  COPYRIGHT (c) 2005 by eXept Software AG
-	      All Rights Reserved
+              All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -17,98 +17,98 @@
 "{ NameSpace: Smalltalk }"
 
 Object subclass:#ParserFlags
-	instanceVariableNames:'warnings warnUnusedVars warnUndeclared warnST80Directives
-		warnSTXHereExtensionUsed warnSTXSpecialComment
-		warnUnderscoreInIdentifier warnOldStyleAssignment
-		warnCommonMistakes warnSTXNameSpaceUse
-		warnPossibleIncompatibilities warnDollarInIdentifier
-		warnParagraphInIdentifier warnHiddenVariables
-		warnAboutVariableNameConventions warnAboutWrongVariableNames
-		warnAboutBadComments warnInconsistentReturnValues
-		warnAboutNonLowercaseLocalVariableNames
-		warnAboutPossibleSTCCompilationProblems
-		warnAboutReferenceToPrivateClass warnAboutShortLocalVariableNames
-		warnAboutPossiblyUnimplementedSelectors
-		warnAboutUnknownCharacterEscapesInJavaScriptStringConstant
-		warnPlausibilityChecks allowLiteralNameSpaceSymbols
-		allowUnderscoreInIdentifier allowDollarInIdentifier
-		allowParagraphInIdentifier allowOldStyleAssignment
-		allowSqueakExtensions allowDolphinExtensions
-		allowExtendedBinarySelectors allowQualifiedNames
-		allowFunctionCallSyntaxForBlockEvaluation
-		allowLocalVariableDeclarationWithInitializerExpression
-		allowDomainVariables allowArrayIndexSyntaxExtension
-		allowReservedWordsAsSelectors allowVariableReferences
-		allowLazyValueExtension allowFixedPointLiterals
-		allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals
-		allowExtensionsToPrivateClasses allowSqueakPrimitives
-		allowVisualAgePrimitives allowSTVPrimitives allowSTVExtensions
-		allowNationalCharactersInIdentifier allowHashAsBinarySelector
-		allowSTXEOLComments allowEmptyStatements
-		allowVisualWorksMethodAnnotations
-		allowPossibleSTCCompilationProblems arraysAreImmutable
-		stringsAreImmutable implicitSelfSends stcKeepCIntermediate
-		stcKeepOIntermediate stcKeepSTIntermediate stcModulePath
-		stcCompilation stcCompilationIncludes stcCompilationDefines
-		stcCompilationOptions stcPath ccCompilationOptions ccPath
-		linkArgs linkSharedArgs linkCommand libPath searchedLibraries
-		warnAboutPeriodInSymbol allowPeriodInSymbol allowCaretAsBinop
-		allowUnicodeStrings allowUnicodeCharacters allowCharacterEscapes
-		allowStringEscapes allowAssignmentToBlockArgument
-		allowAssignmentToMethodArgument allowAssignmentToPoolVariable
-		lineNumberInfo allowSTXDelimiterComments
-		allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument
-		warnAssignmentToMethodArgument warnAssignmentToPoolVariable
-		allowSignedByteArrayElements allowSymbolsStartingWithDigit
-		allowJavaScriptConst'
-	classVariableNames:'AllowArrayIndexSyntaxExtension AllowAssignmentToBlockArgument
-		AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable
-		AllowCaretAsBinop AllowCharacterEscapes AllowDollarInIdentifier
-		AllowDolphinExtensions AllowDomainVariables AllowEmptyStatements
-		AllowExtendedBinarySelectors AllowExtendedSTXSyntax
-		AllowExtensionsToPrivateClasses AllowFixedPointLiterals
-		AllowFunctionCallSyntaxForBlockEvaluation
-		AllowHashAsBinarySelector AllowLazyValueExtension
-		AllowLiteralNameSpaceSymbols
-		AllowLocalVariableDeclarationWithInitializerExpression
-		AllowNationalCharactersInIdentifier AllowOldStyleAssignment
-		AllowParagraphInIdentifier AllowPeriodInSymbol
-		AllowPossibleSTCCompilationProblems AllowQualifiedNames
-		AllowReservedWordsAsSelectors AllowSTVExtensions
-		AllowSTVPrimitives AllowSTXDelimiterComments AllowSTXEOLComments
-		AllowSTXExtendedArrayLiterals AllowSqueakExtensions
-		AllowSqueakPrimitives AllowStringEscapes
-		AllowUnderscoreInIdentifier AllowUnicodeCharacters
-		AllowUnicodeStrings AllowVariableReferences
-		AllowVisualAgeESSymbolLiterals AllowVisualAgePrimitives
-		AllowVisualWorksMethodAnnotations ArraysAreImmutable BCCTop
-		CCCompilationOptions CCPath DefineForBorlandC DefineForCLANG
-		DefineForGNUC DefineForMINGW DefineForMINGW32 DefineForMINGW64
-		DefineForMSC DefineForVisualC ForcedCompiler ImplicitSelfSends
-		LibDirectory LibPath LineNumberInfo LinkArgs LinkCommand
-		LinkSharedArgs MakeCommand MingwTop PerMethodFlags SDKTop
-		STCCompilation STCCompilationDefines STCCompilationIncludes
-		STCCompilationOptions STCKeepCIntermediate STCKeepOIntermediate
-		STCKeepSTIntermediate STCModulePath STCPath SearchedLibraries
-		StringsAreImmutable VCTop WarnAboutBadComments
-		WarnAboutNonLowercaseLocalVariableNames WarnAboutPeriodInSymbol
-		WarnAboutPossibleSTCCompilationProblems
-		WarnAboutPossiblyUnimplementedSelectors
-		WarnAboutReferenceToPrivateClass WarnAboutShortLocalVariableNames
-		WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant
-		WarnAboutVariableNameConventions WarnAboutWrongVariableNames
-		WarnAssignmentToBlockArgument WarnAssignmentToMethodArgument
-		WarnAssignmentToPoolVariable WarnCommonMistakes
-		WarnDollarInIdentifier WarnHiddenVariables
-		WarnInconsistentReturnValues WarnOldStyleAssignment
-		WarnParagraphInIdentifier WarnPlausibilityChecks
-		WarnPossibleIncompatibilities WarnST80Directives WarnSTXSpecials
-		WarnUndeclared WarnUnderscoreInIdentifier WarnUnusedVars Warnings
-		AutoDefineVariables AllowSignedByteArrayElements
-		AllowSymbolsStartingWithDigit AllowJavaScriptConst
-		AllowJavaScriptLet'
-	poolDictionaries:''
-	category:'System-Compiler'
+        instanceVariableNames:'warnings warnUnusedVars warnUndeclared warnST80Directives
+                warnSTXHereExtensionUsed warnSTXSpecialComment
+                warnUnderscoreInIdentifier warnOldStyleAssignment
+                warnCommonMistakes warnSTXNameSpaceUse
+                warnPossibleIncompatibilities warnDollarInIdentifier
+                warnParagraphInIdentifier warnHiddenVariables
+                warnAboutVariableNameConventions warnAboutWrongVariableNames
+                warnAboutBadComments warnInconsistentReturnValues
+                warnAboutNonLowercaseLocalVariableNames
+                warnAboutPossibleSTCCompilationProblems
+                warnAboutReferenceToPrivateClass warnAboutShortLocalVariableNames
+                warnAboutPossiblyUnimplementedSelectors
+                warnAboutUnknownCharacterEscapesInJavaScriptStringConstant
+                warnPlausibilityChecks allowLiteralNameSpaceSymbols
+                allowUnderscoreInIdentifier allowDollarInIdentifier
+                allowParagraphInIdentifier allowOldStyleAssignment
+                allowSqueakExtensions allowDolphinExtensions
+                allowExtendedBinarySelectors allowQualifiedNames
+                allowFunctionCallSyntaxForBlockEvaluation
+                allowLocalVariableDeclarationWithInitializerExpression
+                allowDomainVariables allowArrayIndexSyntaxExtension
+                allowReservedWordsAsSelectors allowVariableReferences
+                allowLazyValueExtension allowFixedPointLiterals
+                allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals
+                allowExtensionsToPrivateClasses allowSqueakPrimitives
+                allowVisualAgePrimitives allowSTVPrimitives allowSTVExtensions
+                allowNationalCharactersInIdentifier allowHashAsBinarySelector
+                allowSTXEOLComments allowEmptyStatements
+                allowVisualWorksMethodAnnotations
+                allowPossibleSTCCompilationProblems arraysAreImmutable
+                stringsAreImmutable implicitSelfSends stcKeepCIntermediate
+                stcKeepOIntermediate stcKeepSTIntermediate stcModulePath
+                stcCompilation stcCompilationIncludes stcCompilationDefines
+                stcCompilationOptions stcPath ccCompilationOptions ccPath
+                linkArgs linkSharedArgs linkCommand libPath searchedLibraries
+                warnAboutPeriodInSymbol allowPeriodInSymbol allowCaretAsBinop
+                allowUnicodeStrings allowUnicodeCharacters allowCharacterEscapes
+                allowStringEscapes allowAssignmentToBlockArgument
+                allowAssignmentToMethodArgument allowAssignmentToPoolVariable
+                lineNumberInfo allowSTXDelimiterComments
+                allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument
+                warnAssignmentToMethodArgument warnAssignmentToPoolVariable
+                allowSignedByteArrayElements allowSymbolsStartingWithDigit
+                allowJavaScriptConst'
+        classVariableNames:'AllowArrayIndexSyntaxExtension AllowAssignmentToBlockArgument
+                AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable
+                AllowCaretAsBinop AllowCharacterEscapes AllowDollarInIdentifier
+                AllowDolphinExtensions AllowDomainVariables AllowEmptyStatements
+                AllowExtendedBinarySelectors AllowExtendedSTXSyntax
+                AllowExtensionsToPrivateClasses AllowFixedPointLiterals
+                AllowFunctionCallSyntaxForBlockEvaluation
+                AllowHashAsBinarySelector AllowLazyValueExtension
+                AllowLiteralNameSpaceSymbols
+                AllowLocalVariableDeclarationWithInitializerExpression
+                AllowNationalCharactersInIdentifier AllowOldStyleAssignment
+                AllowParagraphInIdentifier AllowPeriodInSymbol
+                AllowPossibleSTCCompilationProblems AllowQualifiedNames
+                AllowReservedWordsAsSelectors AllowSTVExtensions
+                AllowSTVPrimitives AllowSTXDelimiterComments AllowSTXEOLComments
+                AllowSTXExtendedArrayLiterals AllowSqueakExtensions
+                AllowSqueakPrimitives AllowStringEscapes
+                AllowUnderscoreInIdentifier AllowUnicodeCharacters
+                AllowUnicodeStrings AllowVariableReferences
+                AllowVisualAgeESSymbolLiterals AllowVisualAgePrimitives
+                AllowVisualWorksMethodAnnotations ArraysAreImmutable BCCTop
+                CCCompilationOptions CCPath DefineForBorlandC DefineForCLANG
+                DefineForGNUC DefineForMINGW DefineForMINGW32 DefineForMINGW64
+                DefineForMSC DefineForVisualC ForcedCompiler ImplicitSelfSends
+                LibDirectory LibPath LineNumberInfo LinkArgs LinkCommand
+                LinkSharedArgs MakeCommand MingwTop PerMethodFlags SDKTop
+                STCCompilation STCCompilationDefines STCCompilationIncludes
+                STCCompilationOptions STCKeepCIntermediate STCKeepOIntermediate
+                STCKeepSTIntermediate STCModulePath STCPath SearchedLibraries
+                StringsAreImmutable VCTop WarnAboutBadComments
+                WarnAboutNonLowercaseLocalVariableNames WarnAboutPeriodInSymbol
+                WarnAboutPossibleSTCCompilationProblems
+                WarnAboutPossiblyUnimplementedSelectors
+                WarnAboutReferenceToPrivateClass WarnAboutShortLocalVariableNames
+                WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant
+                WarnAboutVariableNameConventions WarnAboutWrongVariableNames
+                WarnAssignmentToBlockArgument WarnAssignmentToMethodArgument
+                WarnAssignmentToPoolVariable WarnCommonMistakes
+                WarnDollarInIdentifier WarnHiddenVariables
+                WarnInconsistentReturnValues WarnOldStyleAssignment
+                WarnParagraphInIdentifier WarnPlausibilityChecks
+                WarnPossibleIncompatibilities WarnST80Directives WarnSTXSpecials
+                WarnUndeclared WarnUnderscoreInIdentifier WarnUnusedVars Warnings
+                AutoDefineVariables AllowSignedByteArrayElements
+                AllowSymbolsStartingWithDigit AllowJavaScriptConst
+                AllowJavaScriptLet'
+        poolDictionaries:''
+        category:'System-Compiler'
 !
 
 !ParserFlags class methodsFor:'documentation'!
@@ -117,7 +117,7 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
  COPYRIGHT (c) 2005 by eXept Software AG
-	      All Rights Reserved
+              All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -271,7 +271,7 @@
     |key|
 
     PerMethodFlags isNil ifTrue:[
-	PerMethodFlags := Dictionary new.
+        PerMethodFlags := Dictionary new.
     ].
     key := class name, '>>',selector.
     PerMethodFlags at:key put:(Timestamp now + self perMethodDisableWarningTimeDuration).
@@ -614,7 +614,7 @@
 "/    dfn = DefineForLCC ifTrue:[ ^'lcc'].
 
     OperatingSystem isMSWINDOWSlike ifTrue:[
-	^ 'bcc'
+        ^ 'bcc'
     ].
     ^ 'gcc'
 
@@ -761,7 +761,7 @@
 allowDolphinExtensions:aBoolean
     "this allows turning on/off support for computed arrays ##(..) as in dolphin.
      If you want to fileIn Dolphin classes, enable this with:
-	Compiler allowDolphinComputedArrays:true"
+        Compiler allowDolphinComputedArrays:true"
 
     AllowDolphinExtensions := aBoolean.
 
@@ -984,7 +984,7 @@
 allowQualifiedNames:aBoolean
     "this allows turning on/off support for qualifiedNames #{ .., } as in vw3.
      If you want to fileIn vw3 or later classes, enable this with:
-	Compiler allowQualifiedNames:true
+        Compiler allowQualifiedNames:true
      Notice, that qualified names are not really supported semantically
      (they are parsed, but treated like regular globals)
     "
@@ -1025,7 +1025,7 @@
 allowSTVExtensions:aBoolean
     "this allows turning on/off support for ST/V extensions:
      If you want to fileIn ST/V classes, enable this with:
-	Compiler allowSTVComputedArrays:true"
+        Compiler allowSTVComputedArrays:true"
 
     AllowSTVExtensions := aBoolean.
 
@@ -1072,9 +1072,9 @@
 allowSTXDelimiterComments:aBoolean
     "enable token delimited comments;
      these are multiline comments of the form:
-	''>>TOKEN
-	   ... anything, including double quotes
-	TOKEN>>''
+        ''>>TOKEN
+           ... anything, including double quotes
+        TOKEN>>''
      (the '' being a double quote in the above)
      Such comments are especially useful to comment pieces of sample code, which may
      contain another comment in it, but you don't want to make them all EOL comments
@@ -1138,8 +1138,8 @@
 
 allowSqueakExtensions
     "return true, if support for squeak extensions
-	computed arrays { .., }
-	c/java style arguments in message sends rec foo(arg1, ... argN)
+        computed arrays { .., }
+        c/java style arguments in message sends rec foo(arg1, ... argN)
      is enabled."
 
     ^ AllowSqueakExtensions
@@ -1147,11 +1147,11 @@
 
 allowSqueakExtensions:aBoolean
     "this allows turning on/off support for squeak extensions:
-	computed arrays { .., }
-	c/java style arguments in message sends rec foo(arg1, ... argN)
+        computed arrays { .., }
+        c/java style arguments in message sends rec foo(arg1, ... argN)
 
      If you want to fileIn Squeak classes, enable this with:
-	Compiler allowSqueakComputedArrays:true"
+        Compiler allowSqueakComputedArrays:true"
 
     AllowSqueakExtensions := aBoolean.
 
@@ -1207,7 +1207,7 @@
      underscores are still scanned as assignment.
      If you have to fileIn old VW-Vsn2.x classes,
      turn them off with:
-	Compiler allowUnderscoreInIdentifiers:false"
+        Compiler allowUnderscoreInIdentifiers:false"
 
     AllowUnderscoreInIdentifier := aBoolean.
 
@@ -1432,7 +1432,7 @@
      Examples are: expr or:expr2, where expr2 is not a block.
      If you get bored by those warnings, turn them off by adding
      a line as:
-	ParserFlags warnCommonMistakes:false
+        ParserFlags warnCommonMistakes:false
      in your 'private.rc' file"
 
     WarnCommonMistakes := aBoolean
@@ -1502,7 +1502,7 @@
     "this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax).
      If you get bored by those warnings, turn them off by adding
      a line as:
-	ParserFlags warnOldStyleAssignment:false
+        ParserFlags warnOldStyleAssignment:false
      in your 'private.rc' file"
 
     WarnOldStyleAssignment := aBoolean
@@ -1558,7 +1558,7 @@
      on or off.
      If you get bored by those warnings, turn them off by adding
      a line as:
-	ParserFlags warnPossibleIncompatibilities:false
+        ParserFlags warnPossibleIncompatibilities:false
      in your 'private.rc' file."
 
     WarnPossibleIncompatibilities := aBoolean
@@ -1577,7 +1577,7 @@
     "this allows turning on/off warnings about stx specials.
      If you get bored by those warnings, turn them off by adding
      a line as:
-	ParserFlags warnSTXSpecials:false
+        ParserFlags warnSTXSpecials:false
      in your 'private.rc' file"
 
     WarnSTXSpecials := aBoolean
@@ -1598,7 +1598,7 @@
      (i.e. VW releases 2.x).
      If you get bored by those warnings, turn them off by adding
      a line as:
-	ParserFlags warnUnderscoreInIdentifier:false
+        ParserFlags warnUnderscoreInIdentifier:false
      in your 'private.rc' file"
 
     WarnUnderscoreInIdentifier := aBoolean
@@ -1627,7 +1627,7 @@
 warnings:aBoolean
     "this allows turning on/off all warnings; the default is on.
      You can turn off warnings in your 'private.rc' file with
-	 ParserFlags warnings:false
+         ParserFlags warnings:false
     "
 
     Warnings := aBoolean
@@ -1737,7 +1737,11 @@
     DefineForBorlandC := '__BORLANDC__'.
     DefineForVisualC := '__VISUALC__'.
     DefineForMSC := '__MSC__'.
-    DefineForGNUC := '__GNUC__'.
+    "/ https://expeccoalm.exept.de/D252306
+    "/ must not redefine __GNUC__, because gcc defines this anyway with the gcc version 
+    "/ contained in this macro (which is used by glibc includes).
+    "/ also defined in STCCompilerInterface class >> #getCCDefine
+    DefineForGNUC := 'STX__GNUC__'.
     DefineForMINGW := '__MINGW__'.
     DefineForMINGW32 := '__MINGW32__'.
     DefineForMINGW64 := '__MINGW64__'.
@@ -1795,6 +1799,7 @@
 
     "Modified: / 09-08-2006 / 18:47:18 / fm"
     "Modified: / 08-08-2017 / 23:49:41 / cg"
+    "Modified (comment): / 11-05-2018 / 10:12:29 / stefan"
 !
 
 initializeSTCFlagsForTopDirectory:topDirArg
@@ -2558,8 +2563,8 @@
 
 allowSqueakExtensions
     "return true, if support for squeak extensions
-	computed arrays { .., }
-	c/java style arguments in message sends rec foo(arg1, ... argN)
+        computed arrays { .., }
+        c/java style arguments in message sends rec foo(arg1, ... argN)
      is enabled."
 
     ^ allowSqueakExtensions
@@ -2567,8 +2572,8 @@
 
 allowSqueakExtensions:aBoolean
     "this allows turning on/off support for squeak extensions:
-	computed arrays { .., }
-	c/java style arguments in message sends rec foo(arg1, ... argN)
+        computed arrays { .., }
+        c/java style arguments in message sends rec foo(arg1, ... argN)
     "
 
     allowSqueakExtensions := aBoolean