[cfe-dev] Goal for 3.5: Library-friendly headers

Joerg Sonnenberger joerg at britannica.bec.de
Sun Nov 10 06:26:57 PST 2013


On Sun, Nov 10, 2013 at 01:42:24PM +0000, Alp Toker wrote:
> |#undef NetBSD||
> ||#undef mips||
> ||#undef sparc||
> ||#undef INT64_MAX||
> ||#undef alloca|
> 
> This is not OK to do globally -- even if LLVM doesn't care about the
> definition, maybe embedding applications or OS headers do?

Given that 3 of the 5 #undefs are directly relevant for me -- they exist
because OS headers and/or compiler default configurations provide legacy
macros that can't easily be dropped without breaking old cruft. All
modernish software is supposed to use the corresponding __ version of
the names.

INT64_MAX as seen by the context is about a AIX specific header bug.

alloca has a comment about VC++. Might be better to add a conditional
around it and see if that solves the problem.

In short, I don't see a real problem here.

Joerg



More information about the cfe-dev mailing list