Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007377OCaml~DO NOT USE (was: OCaml general)public2016-09-28 01:222016-12-05 09:41
Reporterygrek 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.03.0 
Target Version4.05.0 +dev/beta1/beta2/beta3/rc1Fixed in Version4.05.0 +dev/beta1/beta2/beta3/rc1 
Summary0007377: -std=gnu99 causes annoying warnings
DescriptionProblem 1

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

Problem 2

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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016462)
doligez (administrator)
2016-10-27 16:40

I think the solution is to remove the -std=gnu99 option when using gcc 5 and later (which default to gnu11).

I've created GPR#876 ( https://github.com/ocaml/ocaml/pull/876 [^] ) against trunk because I think this is a bit too risky to fix just before the release.
(0016633)
xleroy (administrator)
2016-12-05 09:41

Fixed in commit 4c03ef7 as part of GPR#876.

- Issue History
Date Modified Username Field Change
2016-09-28 01:22 ygrek New Issue
2016-09-28 17:17 doligez Status new => acknowledged
2016-09-28 17:17 doligez Target Version => 4.04.0 +dev / +beta1 / +beta2
2016-10-27 16:40 doligez Note Added: 0016462
2016-10-27 16:40 doligez Target Version 4.04.0 +dev / +beta1 / +beta2 => 4.05.0 +dev/beta1/beta2/beta3/rc1
2016-12-05 09:41 xleroy Note Added: 0016633
2016-12-05 09:41 xleroy Status acknowledged => resolved
2016-12-05 09:41 xleroy Resolution open => fixed
2016-12-05 09:41 xleroy Fixed in Version => 4.05.0 +dev/beta1/beta2/beta3/rc1
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker