disabled c99 in Solaris builds (original) (raw)
Baesken, Matthias matthias.baesken at sap.com
Tue Dec 11 16:17:28 UTC 2018
- Previous message (by thread): RFR: JDK-8214910 If pandoc is present, markdown spec files should be processed
- Next message (by thread): disabled c99 in Solaris builds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello , it seems that currently the Solaris Oracle Studio Build environment is the only one that explicitly forbids C99 C code by setting -xc99=%none . The current Linux/Mac/AIX/Windows build envs had no issues with the coding.
For example I was running into an error with the C variable declaration order issue (small example below) today in my coding. Is this still a wanted behavior ? What was the reason behind setting -xc99=%none , and is the reason still valid ? I remember we had issues with C99 compatibility back then when VS2010 was used on Windows, but I think these days we use VS2013+, is this correct ?
The example program mixes declarations and "other statements" , which needs C99, I compile with Oracle Studio 12u4 .
/compiler/SS12u4-Oct2017/SUNWspro/bin/cc vardecl.c -o vardecl
No settings -> works nicely
- with C99 disabled as OpenJDK does :
/compiler/SS12u4-Oct2017/SUNWspro/bin/cc -xc99=%none vardecl.c -o vardecl "vardecl.c", line 8: warning: declaration can not follow a statement
- with C99 disabled + errwarn as OpenJDK does :
/compiler/SS12u4-Oct2017/SUNWspro/bin/cc -xc99=%none -errwarn=%all vardecl.c -o vardecl "vardecl.c", line 8: declaration can not follow a statement cc: acomp failed for vardecl.c
example program :
bash-3.2$ more vardecl.c #include <stdio.h>
int main(void) { int a = 0; printf("a: %d \n", a);
int b = 1; printf("b: %d \n", b); return 0; }
Best regards, Matthias
- Previous message (by thread): RFR: JDK-8214910 If pandoc is present, markdown spec files should be processed
- Next message (by thread): disabled c99 in Solaris builds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]