diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2023-10-29 23:31:17 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2023-10-29 23:31:17 +0000 |
commit | 48239f4e1de5c697d4836329fd6ef0f732b26fd4 (patch) | |
tree | f2ea11317ea942014a348d939ae91bb79ebd29da /gnu/gcc | |
parent | 273e62b26726721c9720313b282bbe42937a7abc (diff) |
Make gnu99 the default for gcc 3.3.6 and 4.2.1, not gnu89.
While these versions of gcc don't have full C99 support, it is
better than defaulting to C89 when building modern software.
OK deraadt@
Diffstat (limited to 'gnu/gcc')
-rw-r--r-- | gnu/gcc/gcc/c-opts.c | 5 | ||||
-rw-r--r-- | gnu/gcc/gcc/doc/cppopts.texi | 4 | ||||
-rw-r--r-- | gnu/gcc/gcc/doc/gcc.1 | 10 | ||||
-rw-r--r-- | gnu/gcc/gcc/doc/gcc.info | 11 | ||||
-rw-r--r-- | gnu/gcc/gcc/doc/invoke.texi | 6 |
5 files changed, 20 insertions, 16 deletions
diff --git a/gnu/gcc/gcc/c-opts.c b/gnu/gcc/gcc/c-opts.c index 0494b9c2c37..269857b7678 100644 --- a/gnu/gcc/gcc/c-opts.c +++ b/gnu/gcc/gcc/c-opts.c @@ -236,6 +236,11 @@ c_common_init_options (unsigned int argc, const char **argv) if (c_language == clk_c) { + /* The default for C is gnu99, without warnings for non-static + inline functions. */ + set_std_c99 (false /* ISO */); + flag_gnu89_inline = 1; + /* If preprocessing assembly language, accept any of the C-family front end options since the driver may pass them through. */ for (i = 1; i < argc; i++) diff --git a/gnu/gcc/gcc/doc/cppopts.texi b/gnu/gcc/gcc/doc/cppopts.texi index c1d732b44c0..0d1b44410d9 100644 --- a/gnu/gcc/gcc/doc/cppopts.texi +++ b/gnu/gcc/gcc/doc/cppopts.texi @@ -392,11 +392,11 @@ The revised ISO C standard, published in December 1999. Before publication, this was known as C9X@. @item gnu89 -The 1990 C standard plus GNU extensions. This is the default. +The 1990 C standard plus GNU extensions. @item gnu99 @itemx gnu9x -The 1999 C standard plus GNU extensions. +The 1999 C standard plus GNU extensions. This is the default. @item c++98 The 1998 ISO C++ standard plus amendments. diff --git a/gnu/gcc/gcc/doc/gcc.1 b/gnu/gcc/gcc/doc/gcc.1 index 69921c640f3..467ac428ba2 100644 --- a/gnu/gcc/gcc/doc/gcc.1 +++ b/gnu/gcc/gcc/doc/gcc.1 @@ -1163,15 +1163,15 @@ provided; possible values are names \fBc9x\fR and \fBiso9899:199x\fR are deprecated. .IP "\fBgnu89\fR" 4 .IX Item "gnu89" -Default, \s-1ISO\s0 C90 plus \s-1GNU\s0 extensions (including some C99 features). +\&\s-1ISO\s0 C90 plus \s-1GNU\s0 extensions (including some C99 features). .IP "\fBgnu99\fR" 4 .IX Item "gnu99" .PD 0 .IP "\fBgnu9x\fR" 4 .IX Item "gnu9x" .PD -\&\s-1ISO\s0 C99 plus \s-1GNU\s0 extensions. When \s-1ISO\s0 C99 is fully implemented in \s-1GCC\s0, -this will become the default. The name \fBgnu9x\fR is deprecated. +Default, \s-1ISO\s0 C99 plus \s-1GNU\s0 extensions. +The name \fBgnu9x\fR is deprecated. .IP "\fBc++98\fR" 4 .IX Item "c++98" The 1998 \s-1ISO\s0 \*(C+ standard plus amendments. @@ -6364,7 +6364,7 @@ publication, this was known as C9X. .ie n .IP """gnu89""" 4 .el .IP "\f(CWgnu89\fR" 4 .IX Item "gnu89" -The 1990 C standard plus \s-1GNU\s0 extensions. This is the default. +The 1990 C standard plus \s-1GNU\s0 extensions. .ie n .IP """gnu99""" 4 .el .IP "\f(CWgnu99\fR" 4 .IX Item "gnu99" @@ -6373,7 +6373,7 @@ The 1990 C standard plus \s-1GNU\s0 extensions. This is the default. .el .IP "\f(CWgnu9x\fR" 4 .IX Item "gnu9x" .PD -The 1999 C standard plus \s-1GNU\s0 extensions. +The 1999 C standard plus \s-1GNU\s0 extensions. This is the default. .ie n .IP """c++98""" 4 .el .IP "\f(CWc++98\fR" 4 .IX Item "c++98" diff --git a/gnu/gcc/gcc/doc/gcc.info b/gnu/gcc/gcc/doc/gcc.info index 5db6aeafb6c..65963274a66 100644 --- a/gnu/gcc/gcc/doc/gcc.info +++ b/gnu/gcc/gcc/doc/gcc.info @@ -1350,14 +1350,13 @@ accepts: deprecated. `gnu89' - Default, ISO C90 plus GNU extensions (including some C99 + ISO C90 plus GNU extensions (including some C99 features). `gnu99' `gnu9x' - ISO C99 plus GNU extensions. When ISO C99 is fully - implemented in GCC, this will become the default. The name - `gnu9x' is deprecated. + Default, ISO C99 plus GNU extensions. + The name `gnu9x' is deprecated. `c++98' The 1998 ISO C++ standard plus amendments. @@ -6430,11 +6429,11 @@ cause the preprocessor output to be unsuitable for actual compilation. Before publication, this was known as C9X. `gnu89' - The 1990 C standard plus GNU extensions. This is the default. + The 1990 C standard plus GNU extensions. `gnu99' `gnu9x' - The 1999 C standard plus GNU extensions. + The 1999 C standard plus GNU extensions. This is the default. `c++98' The 1998 ISO C++ standard plus amendments. diff --git a/gnu/gcc/gcc/doc/invoke.texi b/gnu/gcc/gcc/doc/invoke.texi index aa2eeb8ff43..ea12878ce5c 100644 --- a/gnu/gcc/gcc/doc/invoke.texi +++ b/gnu/gcc/gcc/doc/invoke.texi @@ -1188,12 +1188,12 @@ ISO C99. Note that this standard is not yet fully supported; see names @samp{c9x} and @samp{iso9899:199x} are deprecated. @item gnu89 -Default, ISO C90 plus GNU extensions (including some C99 features). +ISO C90 plus GNU extensions (including some C99 features). @item gnu99 @itemx gnu9x -ISO C99 plus GNU extensions. When ISO C99 is fully implemented in GCC, -this will become the default. The name @samp{gnu9x} is deprecated. +Defaults, ISO C99 plus GNU extensions. +The name @samp{gnu9x} is deprecated. @item c++98 The 1998 ISO C++ standard plus amendments. |