[cfe-commits] r55639 - in /cfe/trunk: lib/Lex/Preprocessor.cpp test/Preprocessor/extension-warning.c

Neil Booth neil at daikokuya.co.uk
Tue Sep 2 16:04:20 PDT 2008


Hi Steve,

Steve Naroff wrote:-

> @@ -594,8 +602,7 @@
>    Identifier.setKind(II.getTokenID());
>      
>    // If this is an extension token, diagnose its use.
> -  // FIXME: tried (unsuccesfully) to shut this up when compiling with gnu99
> -  // For now, I'm just commenting it out (while I work on attributes).
> -  if (II.isExtensionToken() && Features.C99) 
> +  // We avoid diagnosing tokens that originate from macro definitions.
> +  if (II.isExtensionToken() && Features.C99 && !DisableMacroExpansion)
>      Diag(Identifier, diag::ext_token_used);
>  }

Is that the correct test?  It looks like its testing whether expansion
is enabled rather than what the source of the token is.

Neil.



More information about the cfe-commits mailing list