lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Feb 28, 2016 at 2:58 PM, Chris Jones <cmsj@tenshu.net> wrote:
> Hey
>
> I've just run into a strange build issue when I was tinkering with clang's
> -Weverything build option.
>
> Specifically, it's complaining about _XOPEN_SOURCE, _LARGEFILE_SOURCE and
> _FILE_OFFSET_BITS in lprefix.h being reserved identifiers.
>
> It seems like in section 7.1.3 of C99, any identifier in any scope, which
> begins with an underscore and a capital letter, is reserved.
>
> Is Lua intending to be C99 compliant?
>
> --
> Cheers,
>
> Chris

This seems to be a failing of clang's -Weverything, as those macros
are defined by platform standard libraries. Lua merely uses them if
they're there.

And considering that the platform standard libraries are part of the
toolchain, and the toolchain is what those identifiers are reserved
FOR, this is a meaningless "warning."

For as much flak as -Wall receives for not actually being "all"
there's a darn good reason for it not to ACTUALLY include everything.

/s/ Adam