public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60886] New: poor parse error recovery for missing parenthesis in initializer-list
@ 2014-04-18 12:50 manu at gcc dot gnu.org
  2014-11-08 20:31 ` [Bug c++/60886] poor parse error recovery for missing parenthesis in mem-initializer-list manu at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: manu at gcc dot gnu.org @ 2014-04-18 12:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60886
           Summary: poor parse error recovery for missing parenthesis in
                    initializer-list
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manu at gcc dot gnu.org

class A {
    A(int _a, int _b) : a(_a, b(_b) {}

    int a, b;
}

manuel@gcc10:~$ clang++ bug.C
bug.C:4:12: error: expected ')'
    int a,b;
           ^
bug.C:2:24: note: to match this '('
  A(int _a, int _b) : a(_a, b(_b) {}
                       ^
1 error generated.
manuel@gcc10:~$ ~/test1/208648/build/gcc/cc1plus bug.C
 A::A(int, int)
bug.C:2:23: error: class ‘A’ does not have any field named ‘a’
   A(int _a, int _b) : a(_a, b(_b) {}
                       ^
bug.C:2:33: error: ‘b’ was not declared in this scope
   A(int _a, int _b) : a(_a, b(_b) {}
                                 ^
bug.C:4:11: error: expected ‘)’ at end of input
     int a,b;
           ^
bug.C:4:11: error: expected ‘{’ at end of input
>From gcc-bugs-return-449325-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Apr 18 13:18:36 2014
Return-Path: <gcc-bugs-return-449325-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19996 invoked by alias); 18 Apr 2014 13:18:36 -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 19963 invoked by uid 48); 18 Apr 2014 13:18:33 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60886] poor parse error recovery for missing parenthesis in mem-initializer-list
Date: Fri, 18 Apr 2014 13:18:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords: error-recovery
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords bug_status cf_reconfirmed_on short_desc everconfirmed
Message-ID: <bug-60886-4-Rk1PL0kFoC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60886-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60886-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-04/txt/msg01345.txt.bz2
Content-length: 685

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`886

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |error-recovery
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-04-18
            Summary|poor parse error recovery   |poor parse error recovery
                   |for missing parenthesis in  |for missing parenthesis in
                   |initializer-list            |mem-initializer-list
     Ever confirmed|0                           |1


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

* [Bug c++/60886] poor parse error recovery for missing parenthesis in mem-initializer-list
  2014-04-18 12:50 [Bug c++/60886] New: poor parse error recovery for missing parenthesis in initializer-list manu at gcc dot gnu.org
@ 2014-11-08 20:31 ` manu at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: manu at gcc dot gnu.org @ 2014-11-08 20:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60886

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
It seems Clang fans peruse GCC's bugzilla to showcase Clang vs GCC in their
talks. This exact example was used in a talk by Samsumg at LinuxCon Europe:

http://events.linuxfoundation.org/sites/events/files/slides/linuxcon-europe-2014-llvm.pdf
>From gcc-bugs-return-466080-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Nov 08 20:31:25 2014
Return-Path: <gcc-bugs-return-466080-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19207 invoked by alias); 8 Nov 2014 20:31:25 -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 19185 invoked by uid 48); 8 Nov 2014 20:31:21 -0000
From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/26553] PIC stubs vs regparm
Date: Sat, 08 Nov 2014 20:31:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: fxcoudert at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc resolution
Message-ID: <bug-26553-4-ofJuizdBxQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-26553-4@http.gcc.gnu.org/bugzilla/>
References: <bug-26553-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg00552.txt.bz2
Content-length: 2590

https://gcc.gnu.org/bugzilla/show_bug.cgi?id&553

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

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

--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
The compiler doesn't do that anymore, since at least 4.8. For example, in 4.8,
we emit this:

    .text
    .globl _g
_g:
    pushl    %ebp
    movl    %esp, %ebp
    subl    $8, %esp
    movl    $1, %eax
    call    L_f$stub
    leave
    ret
    .section
__IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5
L_f$stub:
    .indirect_symbol _f
    hlt ; hlt ; hlt ; hlt ; hlt
    .subsections_via_symbols


and in trunk:


    .text
    .globl _g
_g:
LFB0:
    pushl    %ebp
LCFI0:
    movl    %esp, %ebp
LCFI1:
    subl    $8, %esp
    call    ___x86.get_pc_thunk.ax
L1$pb:
    movl    $1, %eax
    call    _f
    leave
LCFI2:
    ret
LFE0:
    .section __TEXT,__textcoal_nt,coalesced,pure_instructions
    .weak_definition    ___x86.get_pc_thunk.ax
    .private_extern    ___x86.get_pc_thunk.ax
___x86.get_pc_thunk.ax:
LFB1:
    movl    (%esp), %eax
    ret
LFE1:
    .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
    .set L$set$0,LECIE1-LSCIE1
    .long L$set$0
LSCIE1:
    .long    0
    .byte    0x1
    .ascii "zR\0"
    .byte    0x1
    .byte    0x7c
    .byte    0x8
    .byte    0x1
    .byte    0x10
    .byte    0xc
    .byte    0x5
    .byte    0x4
    .byte    0x88
    .byte    0x1
    .align 2
LECIE1:
LSFDE1:
    .set L$set$1,LEFDE1-LASFDE1
    .long L$set$1
LASFDE1:
    .long    LASFDE1-EH_frame1
    .long    LFB0-.
    .set L$set$2,LFE0-LFB0
    .long L$set$2
    .byte    0
    .byte    0x4
    .set L$set$3,LCFI0-LFB0
    .long L$set$3
    .byte    0xe
    .byte    0x8
    .byte    0x84
    .byte    0x2
    .byte    0x4
    .set L$set$4,LCFI1-LCFI0
    .long L$set$4
    .byte    0xd
    .byte    0x4
    .byte    0x4
    .set L$set$5,LCFI2-LCFI1
    .long L$set$5
    .byte    0xc4
    .byte    0xc
    .byte    0x5
    .byte    0x4
    .align 2
LEFDE1:
LSFDE3:
    .set L$set$6,LEFDE3-LASFDE3
    .long L$set$6
LASFDE3:
    .long    LASFDE3-EH_frame1
    .long    LFB1-.
    .set L$set$7,LFE1-LFB1
    .long L$set$7
    .byte    0
    .align 2
LEFDE3:
    .subsections_via_symbols


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

end of thread, other threads:[~2014-11-08 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-18 12:50 [Bug c++/60886] New: poor parse error recovery for missing parenthesis in initializer-list manu at gcc dot gnu.org
2014-11-08 20:31 ` [Bug c++/60886] poor parse error recovery for missing parenthesis in mem-initializer-list manu 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).