[LLVMdev] Compiling with -ansi and -pedantic

Chris Lattner sabre at nondot.org
Wed Feb 22 08:26:08 PST 2006


On Wed, 22 Feb 2006, Martin [iso-8859-1] Pärtel wrote:
> 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.

Looks good, applied:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060220/032052.html
...
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060220/032059.html

Thanks for the patch!

> 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.

It would be nice to just fix all of these issues throughout LLVM.  If we 
just built LLVM with those options, you would know that all cases are 
covered, and that no future cases will slip in.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/


More information about the llvm-dev mailing list