public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/20631] New: Support -std=c90 as alias for -std=c89
@ 2005-03-24 22:17 kst at mib dot org
  2005-03-24 22:24 ` [Bug c/20631] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: kst at mib dot org @ 2005-03-24 22:17 UTC (permalink / raw)
  To: gcc-bugs

gcc supports the options "-std=c89" and "-std=c99".  I suggest adding
"-std=c90" as an alias for "-std=c89".

C89 is the ANSI C standard.  C90 is the ISO C standard, which is 
effectively identical (the most significant difference was a change
in the section numbering).  In my opinion, the name "C90" should be
preferred to "C89"; in any case, both should be considered valid.

The following illustrates the issue.  These commands were run on an x86
Fedora Core 2 system (i686-pc-linux-gnu).  The last command produced
no output (as expected).  My suggestion is that "-std=c90" should
behave identically to "-std=c89".  Note that one of the diagnostics
refers to ISO C90, but the command-line option requires "c89".

% gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/
usr/share/info --enable-shared --enable-threads=posix --disable-checking --
disable-libunwind-exceptions --with-system-zlib --enable-__cxa_atexit --
host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
% cat tmp.c
void tmp(void)
{
    int n = 10;
    int arr[n];
}
% gcc -c -std=c89 -pedantic tmp.c
tmp.c: In function `tmp':
tmp.c:4: warning: ISO C90 forbids variable-size array `arr'
% gcc -c -std=c90 -pedantic tmp.c
cc1: error: unrecognized option `-std=c90'
% gcc -c -std=c99 -pedantic tmp.c
%

-- 
           Summary: Support -std=c90 as alias for -std=c89
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kst at mib dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/20631] Support -std=c90 as alias for -std=c89
  2005-03-24 22:17 [Bug c/20631] New: Support -std=c90 as alias for -std=c89 kst at mib dot org
@ 2005-03-24 22:24 ` pinskia at gcc dot gnu dot org
  2005-03-24 22:50 ` kst at mib dot org
  2005-06-23  0:21 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-24 22:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-24 22:24 -------
the correct way is:
-std=iso9899:1990

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |3.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/20631] Support -std=c90 as alias for -std=c89
  2005-03-24 22:17 [Bug c/20631] New: Support -std=c90 as alias for -std=c89 kst at mib dot org
  2005-03-24 22:24 ` [Bug c/20631] " pinskia at gcc dot gnu dot org
@ 2005-03-24 22:50 ` kst at mib dot org
  2005-06-23  0:21 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: kst at mib dot org @ 2005-03-24 22:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kst at mib dot org  2005-03-24 22:50 -------
> the correct way is:
> -std=iso9899:1990

Sure, but as long as "-std=c89" is supported, why not support "-std=c90"
as well?  It's more correct than "c89", and it's easier to remember
than "iso9899:1990".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/20631] Support -std=c90 as alias for -std=c89
  2005-03-24 22:17 [Bug c/20631] New: Support -std=c90 as alias for -std=c89 kst at mib dot org
  2005-03-24 22:24 ` [Bug c/20631] " pinskia at gcc dot gnu dot org
  2005-03-24 22:50 ` kst at mib dot org
@ 2005-06-23  0:21 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-23  0:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-23 00:21 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-06-23 00:21:08
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/20631] Support -std=c90 as alias for -std=c89
       [not found] <bug-20631-7039@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2010-02-26 17:10 ` manu at gcc dot gnu dot org
@ 2010-02-26 17:11 ` manu at gcc dot gnu dot org
  4 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-26 17:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from manu at gcc dot gnu dot org  2010-02-26 17:11 -------
Thanks for the report. FIXED in GCC 4.5


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/20631] Support -std=c90 as alias for -std=c89
       [not found] <bug-20631-7039@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-02-25 15:41 ` joseph at codesourcery dot com
@ 2010-02-26 17:10 ` manu at gcc dot gnu dot org
  2010-02-26 17:11 ` manu at gcc dot gnu dot org
  4 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-26 17:10 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1476 bytes --]



------- Comment #7 from manu at gcc dot gnu dot org  2010-02-26 17:10 -------
Subject: Bug 20631

Author: manu
Date: Fri Feb 26 17:09:29 2010
New Revision: 157096

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157096
Log:
2010-02-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR c/20631
        * doc/cpp.texi: Use c90 instead of c89 and gnu90 instead of gnu89.
        * doc/standards.texi: Likewise.
        * doc/extend.texi: Likewise.
        * doc/trouble.texi: Likewise.
        * doc/cppopts.texi: Likewise. 
        * doc/install.texi: Likewise.
        * c.opt (std=c90,std=gnu90): New options.
        * c-opts.c (c_common_handle_option): Handle them.
testsuite/
        * gcc.dg/cpp/c90-pedantic.c: New.
        * gcc.dg/cpp/c90.c: New.
        * gcc.dg/gnu90-const-expr-1.c: New.
        * gcc.dg/Woverlength-strings-pedantic-c90.c: New.

Added:
    trunk/gcc/testsuite/gcc.dg/Woverlength-strings-pedantic-c90.c
    trunk/gcc/testsuite/gcc.dg/cpp/c90-pedantic.c
    trunk/gcc/testsuite/gcc.dg/cpp/c90.c
    trunk/gcc/testsuite/gcc.dg/gnu90-const-expr-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-opts.c
    trunk/gcc/c.opt
    trunk/gcc/doc/cpp.texi
    trunk/gcc/doc/cppopts.texi
    trunk/gcc/doc/extend.texi
    trunk/gcc/doc/install.texi
    trunk/gcc/doc/invoke.texi
    trunk/gcc/doc/standards.texi
    trunk/gcc/doc/trouble.texi
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/20631] Support -std=c90 as alias for -std=c89
       [not found] <bug-20631-7039@http.gcc.gnu.org/bugzilla/>
  2007-01-26  2:08 ` manu at gcc dot gnu dot org
  2010-02-25 11:56 ` manu at gcc dot gnu dot org
@ 2010-02-25 15:41 ` joseph at codesourcery dot com
  2010-02-26 17:10 ` manu at gcc dot gnu dot org
  2010-02-26 17:11 ` manu at gcc dot gnu dot org
  4 siblings, 0 replies; 9+ messages in thread
From: joseph at codesourcery dot com @ 2010-02-25 15:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from joseph at codesourcery dot com  2010-02-25 15:40 -------
Subject: Re:  Support -std=c90 as alias for -std=c89

On Thu, 25 Feb 2010, manu at gcc dot gnu dot org wrote:

> Joseph, would you approve a patch for this?

Yes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/20631] Support -std=c90 as alias for -std=c89
       [not found] <bug-20631-7039@http.gcc.gnu.org/bugzilla/>
  2007-01-26  2:08 ` manu at gcc dot gnu dot org
@ 2010-02-25 11:56 ` manu at gcc dot gnu dot org
  2010-02-25 15:41 ` joseph at codesourcery dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-25 11:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from manu at gcc dot gnu dot org  2010-02-25 11:56 -------
Joseph, would you approve a patch for this?


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joseph at codesourcery dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/20631] Support -std=c90 as alias for -std=c89
       [not found] <bug-20631-7039@http.gcc.gnu.org/bugzilla/>
@ 2007-01-26  2:08 ` manu at gcc dot gnu dot org
  2010-02-25 11:56 ` manu at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-01-26  2:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from manu at gcc dot gnu dot org  2007-01-26 02:08 -------
Do we really want this?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-02-26 17:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-24 22:17 [Bug c/20631] New: Support -std=c90 as alias for -std=c89 kst at mib dot org
2005-03-24 22:24 ` [Bug c/20631] " pinskia at gcc dot gnu dot org
2005-03-24 22:50 ` kst at mib dot org
2005-06-23  0:21 ` pinskia at gcc dot gnu dot org
     [not found] <bug-20631-7039@http.gcc.gnu.org/bugzilla/>
2007-01-26  2:08 ` manu at gcc dot gnu dot org
2010-02-25 11:56 ` manu at gcc dot gnu dot org
2010-02-25 15:41 ` joseph at codesourcery dot com
2010-02-26 17:10 ` manu at gcc dot gnu dot org
2010-02-26 17:11 ` manu at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).