[GHC] #11757: Turn on (and require) C99/C11 mode by default
GHC
ghc-devs at haskell.org
Sat Mar 26 08:29:38 UTC 2016
#11757: Turn on (and require) C99/C11 mode by default
-------------------------------------+-------------------------------------
Reporter: hvr | Owner:
Type: task | Status: new
Priority: normal | Milestone: 8.2.1
Component: Build System | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by hvr:
@@ -13,1 +13,1 @@
- with out
+ with our `CONF_CC_OPTS_STAGE[012]` scheme...
New description:
GCC 5.x started defaulting to C99 (or rather gnu99 mode), while Clang has
been defaulting to C99 (or even C11) for a bit longer, as has Apple's
patched GCC.
So we should try to consistently turn on (if needed) C99 (or C11) support
for all compilers supported by GHC, and adapt the code-base to expect C99
compliance (which probably allows us to get rid of a couple of compat-CPP
and make the C code more idiomatic and readable in the process...).
GNU Autoconf provides a `AC_PROG_CC_C99` which figures out what's needed
to have the compiler turn on C99 support, but we need to integrate that
with our `CONF_CC_OPTS_STAGE[012]` scheme...
Requiring C99 will effectively rule out GCC 3.x (which is old enough that
we can drop support for that), and possibly also GCC < 4.3 at some point
(for reference, even Debian 6 Squeeze didn't have GCC 4.2 anymore), see
also https://gcc.gnu.org/c99status.html
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11757#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list