No C99 compliant functions are used #10
Comments
|
ok, i'm wrong a bit. |
|
I guess you can experiment with "#if defined(_WIN32) && !defined(CYGWIN)" instead of #ifdef _WIN32 |
|
sadly, it doesn't work even if i modified to use so i'm getting to being not sure it is still valid cparser's issue... update1: above snippet had visible tabs. |
|
Looks like cygwin ignores posix feature test macros if STRICT_ANSI is defined, that is very surprising behaviour.
|
|
POSIX != STRICT_ANSI The two are entirely different. If STRICT_ANSI is defined then you need to follow the ANSI standard document and not the POSIX one. The macro STRICT_ANSI means do not define any functions outside of the standard document for ANSI. |
|
I know they are different. Obviously the standards does not specify a "right" way to resolve the situation when both |
|
If you want both then don't be STRICT. The real issue is C99 compliance is an ISO specification and -ansi is implied when -std=c99 is used. The macro __STRICT_ANSI__ is predefined when the -ansi option is used. Some header files may notice this macro and refrain from declaring certain functions or defining certain macros that the ISO standard doesn't call for; this is to avoid interfering with any programs that might use these names for other things.Changes to GCC and other compilers would need to be accepted for the change to occur industry wide for a change to the semantics of how this works. So your best bet is to manage STRICT_ANSI in your files before including the headers with a strong comment as to why you manage it.. |
SSIA.
according to glibc man pages,
popen()andpclose()requiresstdio.hand_POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE.fileno()requiresstdio.hand_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE.note,
src/parser/preprocessor.cdoes not includestdio.hexplicitly.also top Makefile has hardcoded
-std=c99 -pedantic.P.S.
i don't know about cparser coding convention correctly.
but using pedantic standard explicitly by default and breaking them looks simply uncool.
The text was updated successfully, but these errors were encountered: