public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/56910] New: Syntax error seemingly sneaks through gcc
@ 2013-04-10 17:20 daven at model dot com
  2013-04-11 12:38 ` [Bug c/56910] " redi at gcc dot gnu.org
  2014-03-20  7:14 ` mpolacek at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: daven at model dot com @ 2013-04-10 17:20 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56910
           Summary: Syntax error seemingly sneaks through gcc
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daven@model.com


I'm not sure if the following code is triggering some obscure extension
to gcc or not, but it sure seems like it should generate a syntax
error (it does in all other compilers I've tried).

--- cut here (z.c) ---
typedef int int32_t;
typedef unsigned int uint32_t;

#include <stdio.h>

extern void vl_create_cell_reg(
    int32_t reg_idx,
    int32_t state_idx,
    uint32_t CR_flags,
    uint32_t init_val,
    char *name;  /* <--- this parameter is missing in the body and contains a
spurious ';' */
);

void vl_create_cell_reg( int32_t reg_idx, int32_t state_idx, uint32_t CR_flags,
uint32_t init_val )
{
}
--- cut here (end of z.c) ---

If I cut/paste this source to a file called "z.c", it compiles fine, i.e.:

$ gcc -c -Wall -Werror z.c
<< no errors/warnings reported >>

Note, if I remove the spurious ';', I get the expected error:

$ gcc -c -Wall -Werror z.c
z.c:15:6: error: conflicting types for ‘vl_create_cell_reg’
z.c:7:13: note: previous declaration of ‘vl_create_cell_reg’ was here
>From gcc-bugs-return-419721-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 10 17:28:41 2013
Return-Path: <gcc-bugs-return-419721-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29731 invoked by alias); 10 Apr 2013 17:28:41 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29716 invoked by uid 48); 10 Apr 2013 17:28:38 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/56911] New: [4.8 Regression] g++.dg/cpp0x/enum25.C:14:19: ICE: in finish_class_member_access_expr, at cp/typeck.c:2673 with -fpic
Date: Wed, 10 Apr 2013 17:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-56911-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg00866.txt.bz2
Content-length: 1172


http://gcc.gnu.org/bugzilla/show_bug.cgi?idV911

             Bug #: 56911
           Summary: [4.8 Regression] g++.dg/cpp0x/enum25.C:14:19: ICE: in
                    finish_class_member_access_expr, at cp/typeck.c:2673
                    with -fpic
    Classification: Unclassified
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ubizjak@gmail.com
            Target: x86_64-pc-linux-gnu


~/gcc-build-48/gcc/cc1plus -std=c++11 -fpic enum25.C
 int main()
enum25.C:14:19: internal compiler error: in finish_class_member_access_expr, at
cp/typeck.c:2673
   if (a.b == a.B::Y)
                   ^
0x58655b finish_class_member_access_expr(tree_node*, tree_node*, bool, int)
        ../../gcc-svn/branches/gcc-4_8-branch/gcc/cp/typeck.c:2673
0x57317b cp_parser_postfix_dot_deref_expression
        ../../gcc-svn/branches/gcc-4_8-branch/gcc/cp/parser.c:6140
0x55cd50 cp_parser_postfix_expression
        ../../gcc-svn/branches/gcc-4_8-branch/gcc/cp/parser.c:5864
...


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

* [Bug c/56910] Syntax error seemingly sneaks through gcc
  2013-04-10 17:20 [Bug c/56910] New: Syntax error seemingly sneaks through gcc daven at model dot com
@ 2013-04-11 12:38 ` redi at gcc dot gnu.org
  2014-03-20  7:14 ` mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2013-04-11 12:38 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-04-11 12:38:45 UTC ---
$ gcc -c -pedantic x.c
x.c:11:5: warning: ISO C forbids forward parameter declarations [-pedantic]


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

* [Bug c/56910] Syntax error seemingly sneaks through gcc
  2013-04-10 17:20 [Bug c/56910] New: Syntax error seemingly sneaks through gcc daven at model dot com
  2013-04-11 12:38 ` [Bug c/56910] " redi at gcc dot gnu.org
@ 2014-03-20  7:14 ` mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-03-20  7:14 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Nothing to do here.


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

end of thread, other threads:[~2014-03-20  7:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-10 17:20 [Bug c/56910] New: Syntax error seemingly sneaks through gcc daven at model dot com
2013-04-11 12:38 ` [Bug c/56910] " redi at gcc dot gnu.org
2014-03-20  7:14 ` mpolacek at gcc dot gnu.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).