autoconf
[Top][All Lists]
Advanced

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

AC_PROG_CC_C89 is not adding -std=c89 to CFLAGS


From: Dimitrios Apostolou
Subject: AC_PROG_CC_C89 is not adding -std=c89 to CFLAGS
Date: Sat, 14 Jan 2017 02:12:52 +0100 (CET)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

Hello list,

recent GCC versions default to C99 or even C11. I was expecting that adding AC_PROG_CC_C89 to configure.ac, would force C89, probably by using -std=gnu89. But this was not the case. Any ideas why?


Context is compiling a C program using a recent gcc on Solaris 10, resulted to this error:

/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:346:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications"


From the header file:

#if defined(_STDC_C99) && (defined(__XOPEN_OR_POSIX) && !defined(_XPG6))
#error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
        and pre-2001 POSIX applications"
#elif !defined(_STDC_C99) && \
        (defined(__XOPEN_OR_POSIX) && defined(_XPG6))
#error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications \
        require the use of c99"
#endif


Thank you in advance,
Dimitris





reply via email to

[Prev in Thread] Current Thread [Next in Thread]