Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
-std=gnu99 causes annoying warnings #7377
Original bug ID: 7377
When compiling c++ code via ocamlc (passing -ccopt -xc++ to tell gcc treat .c file as c++ code) gcc will complain that gnu99 applies to C code only
With gcc 6 (for example) default C standard is gnu11 and -std=gnu99 becomes too pessimistic and may cause code to fail (theory - didn't observe this).
One way to fix this would be to remove this option from native_c_compiler and require users to supply a C99 supporting compiler at configure time explicitly if needed (with -cc "gcc -std=gnu99") - this will solve problem 1 for us because we use newer gcc anyway.