Opened 17 years ago

Closed 17 years ago

Last modified 14 years ago

#174 closed defect (fixed)

premake.lua incorrectly defines __STDC_VERSION__ on GCC

Reported by: Philip Taylor Owned by:
Priority: Nice to Have Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description

premake.lua says:

package.defines = {
    "__STDC_VERSION__=199901L",
    "CONFIG_USE_MMGR",
}

sysdep.h says:

for some reason, g++-3.3 claims to support C99 (according to __STDC_VERSION__) but doesn't have the restrict keyword.

So it's our fault that we get a little confused by GCC pretending to support C99 when it really doesn't.

Claiming to support C99 is nonsensical in any case, because we're writing C++ and not C. It would probably be better to define a series of HAVE_RELEVANT_C99LIKE_FEATURE, for all the relevant C99-like features which GCC supports in its normal nonstandard C++ mode.

Change History (2)

comment:1 by Philip Taylor, 17 years ago

Resolution: fixed
Status: newclosed

Fixed in r5081.

comment:2 by (none), 14 years ago

Milestone: ASAP

Milestone ASAP deleted

Note: See TracTickets for help on using tickets.