[LLVMdev] Compiling with -ansi and -pedantic

Martin Pärtel lagitus at mbnet.fi
Wed Feb 22 06:06:18 PST 2006


Hi,

I'd like to use the compiler flags -ansi -pedantic -Wno-long-long in my 
project but some llvm headers cause errors with them. I tried to compile llvm 
with these flags but it proved to be quite difficult. The headers, however, 
seemed easier to fix. Almost all of the errors were commas at the ends of 
enum lists or extraneous semicolons after namespaces.

I went ahead and hunted down these trivial errors by running each header 
through gcc with -D__STDC_LIMIT_MACROS -ansi -pedantic -Wno-long-long -x c++ 
-S. Obviously a few headers required configuration macros and did not 
therefore compile cleanly, so I might have missed potential errors in those.

Included is a patch against today's CVS that fixes what I managed to find.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-pedantic-headers.patch
Type: text/x-diff
Size: 19348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060222/9e1ac577/attachment.patch>


More information about the llvm-dev mailing list