[cfe-commits] r162810 - in /cfe/trunk: include/clang/Lex/MacroInfo.h include/clang/Lex/Preprocessor.h lib/Frontend/PrintPreprocessedOutput.cpp lib/Lex/MacroInfo.cpp lib/Lex/PPDirectives.cpp lib/Lex/PPMacroExpansion.cpp lib/Lex/Pragma.cpp lib/Sema

Alexander Kornienko alexfh at google.com
Wed Aug 29 17:48:39 PDT 2012


I'm not really sure if that was my patch, but I'm looking into it now.

Anyone else has any preferences except compatibility with gcc?

On Wed, Aug 29, 2012 at 5:16 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Wed, Aug 29, 2012 at 4:40 PM, Alexander Kornienko <alexfh at google.com>
> wrote:
> > No, there was no intention to change behavior. But could you provide more
> > details on this?
>
> Just compile it with clang; before, it would fail to compile:
> [...]gcc-4_2-testsuite/src/gcc.dg/cpp/mac-dir-1.c:27:15: error: too
> many arguments provided to function-like macro invocation
>      if (1 != f(2
>               ^
> [...]/gcc-4_2-testsuite/src/gcc.dg/cpp/mac-dir-1.c:27:15: error: use
> of undeclared identifier 'f'
>
> With your patch, it compiles without errors, but the compiled program
> aborts.  For comparison, with gcc, the program compiles and runs
> successfully.  (I'm pretty sure this is all undefined behavior per
> C99, but it would be nice to be consistent with gcc.)
>
> -Eli
>



-- 
Regards,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120829/d045ba1a/attachment.html>


More information about the cfe-commits mailing list