public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/29129]  New: Strictly conforming code rejected
@ 2006-09-18 14:07 neil at gcc dot gnu dot org
  2006-09-19  3:24 ` [Bug c/29129] [4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: neil at gcc dot gnu dot org @ 2006-09-18 14:07 UTC (permalink / raw)
  To: gcc-bugs

Compile the following with -std=c99 -pedantic-errors

void f(unsigned int [*]);

foo.c:1: error: '[*]' not allowed in other than a declaration


-- 
           Summary: Strictly conforming code rejected
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: neil at gcc dot gnu dot org


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


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

* [Bug c/29129] [4.2 Regression] Strictly conforming code rejected
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
@ 2006-09-19  3:24 ` pinskia at gcc dot gnu dot org
  2006-09-19 11:10 ` joseph at codesourcery dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-19  3:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-09-19 03:24 -------
Confirmed, a regression from 4.1.2 which we accepted this but gave a warning
saying we don't implement the semantics yet.  Since we accepted this with a
warning before and now reject it, I am going to say this is a regression.

Note I think Mike Stump's work in this area caused this bug but I am not 100%
for sure.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |blocker
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
      Known to fail|                            |4.2.0
      Known to work|                            |4.1.2
   Last reconfirmed|0000-00-00 00:00:00         |2006-09-19 03:24:24
               date|                            |
            Summary|Strictly conforming code    |[4.2 Regression] Strictly
                   |rejected                    |conforming code rejected
   Target Milestone|---                         |4.2.0


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


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

* [Bug c/29129] [4.2 Regression] Strictly conforming code rejected
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
  2006-09-19  3:24 ` [Bug c/29129] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-09-19 11:10 ` joseph at codesourcery dot com
  2006-09-19 13:04 ` neil at daikokuya dot co dot uk
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: joseph at codesourcery dot com @ 2006-09-19 11:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from joseph at codesourcery dot com  2006-09-19 11:10 -------
Subject: Re:   New: Strictly conforming code rejected

On Mon, 18 Sep 2006, neil at gcc dot gnu dot org wrote:

> Compile the following with -std=c99 -pedantic-errors
> 
> void f(unsigned int [*]);
> 
> foo.c:1: error: '[*]' not allowed in other than a declaration

As the diagnostic indicates, "unsigned int [*]" is not a declaration with 
function prototype scope but a type name.  Feel free to submit a DR 
regarding the exact meaning of "can only be used in declarations with 
function prototype scope".


-- 


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


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

* [Bug c/29129] [4.2 Regression] Strictly conforming code rejected
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
  2006-09-19  3:24 ` [Bug c/29129] [4.2 Regression] " pinskia at gcc dot gnu dot org
  2006-09-19 11:10 ` joseph at codesourcery dot com
@ 2006-09-19 13:04 ` neil at daikokuya dot co dot uk
  2006-09-21  2:08 ` mmitchel at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: neil at daikokuya dot co dot uk @ 2006-09-19 13:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from neil at daikokuya dot co dot uk  2006-09-19 13:04 -------
Subject: Re:  [4.2 Regression] Strictly conforming code rejected

joseph at codesourcery dot com wrote:-

> > foo.c:1: error: '[*]' not allowed in other than a declaration
> 
> As the diagnostic indicates, "unsigned int [*]" is not a declaration with 
> function prototype scope but a type name.  Feel free to submit a DR 
> regarding the exact meaning of "can only be used in declarations with 
> function prototype scope".

I'm quite happy my reading is correct, thanks, but don't let me stop
you.

I'd be interested in why you believe an alternative reading is
justified despite its explicit inclusion in the grammar of 6.7.6,
plus examples.  DR 295 is an example of continuing imprecise wording
that is far more gratuitous.

Neil.


-- 


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


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

* [Bug c/29129] [4.2 Regression] Strictly conforming code rejected
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-09-19 13:04 ` neil at daikokuya dot co dot uk
@ 2006-09-21  2:08 ` mmitchel at gcc dot gnu dot org
  2006-09-21 12:31 ` [Bug c/29129] [4.2 Regression] [DR needed] unnamed parameters using [*] jsm28 at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-21  2:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c/29129] [4.2 Regression] [DR needed] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-09-21  2:08 ` mmitchel at gcc dot gnu dot org
@ 2006-09-21 12:31 ` jsm28 at gcc dot gnu dot org
  2006-10-16 23:48 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-09-21 12:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jsm28 at gcc dot gnu dot org  2006-09-21 12:30 -------
Suspending pending DR.  Neil's interpretation would be a more useful sense of
the
standard, but there is a deliberate decision to err on the side of rejecting
code
rather than of accidentally creating an extension.

If the WG14 Spring 2007 meeting does happen in the UK as proposed then I may
try
to prepare DRs for this and other issues.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED
            Summary|[4.2 Regression] Strictly   |[4.2 Regression] [DR needed]
                   |conforming code rejected    |unnamed parameters using [*]


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


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

* [Bug c/29129] [4.2 Regression] [DR needed] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-09-21 12:31 ` [Bug c/29129] [4.2 Regression] [DR needed] unnamed parameters using [*] jsm28 at gcc dot gnu dot org
@ 2006-10-16 23:48 ` mmitchel at gcc dot gnu dot org
  2006-11-17  0:15 ` [Bug c/29129] [4.2/4.3 " jbuck at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-16 23:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2006-10-16 23:48 -------
Given that Joseph doesn't think we should change the behavior, we shouldn't
have this on the release watchlist.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4


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


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

* [Bug c/29129] [4.2/4.3 Regression] [DR needed] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-10-16 23:48 ` mmitchel at gcc dot gnu dot org
@ 2006-11-17  0:15 ` jbuck at gcc dot gnu dot org
  2007-05-14 21:37 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jbuck at gcc dot gnu dot org @ 2006-11-17  0:15 UTC (permalink / raw)
  To: gcc-bugs



-- 

jbuck at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|blocker                     |normal


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


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

* [Bug c/29129] [4.2/4.3 Regression] [DR needed] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-11-17  0:15 ` [Bug c/29129] [4.2/4.3 " jbuck at gcc dot gnu dot org
@ 2007-05-14 21:37 ` mmitchel at gcc dot gnu dot org
  2007-07-20  3:50 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-05-14 21:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2007-05-14 22:27 -------
Will not be fixed in 4.2.0; retargeting at 4.2.1.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.0                       |4.2.1


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


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

* [Bug c/29129] [4.2/4.3 Regression] [DR needed] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-05-14 21:37 ` mmitchel at gcc dot gnu dot org
@ 2007-07-20  3:50 ` mmitchel at gcc dot gnu dot org
  2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-07-20  3:50 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.1                       |4.2.2


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


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

* [Bug c/29129] [4.2/4.3 Regression] [DR needed] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-07-20  3:50 ` mmitchel at gcc dot gnu dot org
@ 2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
  2008-02-01 16:55 ` jsm28 at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-10-09 19:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from mmitchel at gcc dot gnu dot org  2007-10-09 19:22 -------
Change target milestone to 4.2.3, as 4.2.2 has been released.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.2                       |4.2.3


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


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

* [Bug c/29129] [4.2/4.3 Regression] [DR needed] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
@ 2008-02-01 16:55 ` jsm28 at gcc dot gnu dot org
  2008-05-19 20:47 ` [Bug c/29129] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-02-01 16:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jsm28 at gcc dot gnu dot org  2008-02-01 16:53 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.3                       |4.2.4


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


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

* [Bug c/29129] [4.2/4.3/4.4 Regression] [DR needed] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2008-02-01 16:55 ` jsm28 at gcc dot gnu dot org
@ 2008-05-19 20:47 ` jsm28 at gcc dot gnu dot org
  2009-02-03 20:33 ` [Bug c/29129] [4.2/4.3/4.4 Regression] [DR#341] " jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jsm28 at gcc dot gnu dot org  2008-05-19 20:22 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.4                       |4.2.5


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


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

* [Bug c/29129] [4.2/4.3/4.4 Regression] [DR#341] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2008-05-19 20:47 ` [Bug c/29129] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2009-02-03 20:33 ` jsm28 at gcc dot gnu dot org
  2009-02-04  0:59 ` jsm28 at gcc dot gnu dot org
  2009-02-04  1:01 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-02-03 20:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jsm28 at gcc dot gnu dot org  2009-02-03 20:33 -------
The conclusion on DR#341 was that this should indeed be accepted; I'll fix
this.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jsm28 at gcc dot gnu dot org
                   |dot org                     |
             Status|SUSPENDED                   |ASSIGNED
           Priority|P4                          |P2
   Last reconfirmed|2006-09-19 03:24:24         |2009-02-03 20:33:31
               date|                            |
            Summary|[4.2/4.3/4.4 Regression] [DR|[4.2/4.3/4.4 Regression]
                   |needed] unnamed parameters  |[DR#341] unnamed parameters
                   |using [*]                   |using [*]


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


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

* [Bug c/29129] [4.2/4.3/4.4 Regression] [DR#341] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2009-02-03 20:33 ` [Bug c/29129] [4.2/4.3/4.4 Regression] [DR#341] " jsm28 at gcc dot gnu dot org
@ 2009-02-04  0:59 ` jsm28 at gcc dot gnu dot org
  2009-02-04  1:01 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-02-04  0:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jsm28 at gcc dot gnu dot org  2009-02-04 00:59 -------
Subject: Bug 29129

Author: jsm28
Date: Wed Feb  4 00:59:21 2009
New Revision: 143918

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143918
Log:
        PR c/29129
        * c-decl.c (grokdeclarator): Mark [*] arrays in field declarators
        as having variable size.  Do not give an error for unnamed
        parameters with [*] declarators.  Give a warning for type names
        with [*] declarators and mark them as variable size.
        * c-parser.c (c_parser_sizeof_expression): Do not give an error
        for sizeof applied to [*] type names.

testsuite:
        * c90-arraydecl-1.c: Do not expect error for [*] in abstract
        declarator.
        * vla-6.c: Likewise.  Expect warning not error for [*] lexically
        inside function prototype but not part of parameter declarator.
        * vla-11.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vla-11.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-decl.c
    trunk/gcc/c-parser.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/c90-arraydecl-1.c
    trunk/gcc/testsuite/gcc.dg/vla-6.c


-- 


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


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

* [Bug c/29129] [4.2/4.3/4.4 Regression] [DR#341] unnamed parameters using [*]
  2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2009-02-04  0:59 ` jsm28 at gcc dot gnu dot org
@ 2009-02-04  1:01 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-02-04  1:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from jsm28 at gcc dot gnu dot org  2009-02-04 01:01 -------
Fixed in 4.4 and it's safest not to apply the fix to release branches.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.4.0


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


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

end of thread, other threads:[~2009-02-04  1:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-18 14:07 [Bug c/29129] New: Strictly conforming code rejected neil at gcc dot gnu dot org
2006-09-19  3:24 ` [Bug c/29129] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-09-19 11:10 ` joseph at codesourcery dot com
2006-09-19 13:04 ` neil at daikokuya dot co dot uk
2006-09-21  2:08 ` mmitchel at gcc dot gnu dot org
2006-09-21 12:31 ` [Bug c/29129] [4.2 Regression] [DR needed] unnamed parameters using [*] jsm28 at gcc dot gnu dot org
2006-10-16 23:48 ` mmitchel at gcc dot gnu dot org
2006-11-17  0:15 ` [Bug c/29129] [4.2/4.3 " jbuck at gcc dot gnu dot org
2007-05-14 21:37 ` mmitchel at gcc dot gnu dot org
2007-07-20  3:50 ` mmitchel at gcc dot gnu dot org
2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
2008-02-01 16:55 ` jsm28 at gcc dot gnu dot org
2008-05-19 20:47 ` [Bug c/29129] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2009-02-03 20:33 ` [Bug c/29129] [4.2/4.3/4.4 Regression] [DR#341] " jsm28 at gcc dot gnu dot org
2009-02-04  0:59 ` jsm28 at gcc dot gnu dot org
2009-02-04  1:01 ` jsm28 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).