public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44991]  New: default argument with '<' cause compilation error
@ 2010-07-19 15:20 ogoffart at kde dot org
  2010-07-19 15:38 ` [Bug c++/44991] [4.4/4.5/4.6 Regression] " redi at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: ogoffart at kde dot org @ 2010-07-19 15:20 UTC (permalink / raw)
  To: gcc-bugs

class bar {
    void foo(bool a = 3 < 2, bool b = true) {}
};

$ g++ -c ./main.cpp
./main.cpp:2:39: error: redefinition of 'bool b'
./main.cpp:2:39: error: 'bool b' previously declared here


(This happends only if the funciton is a member function)


-- 
           Summary: default argument with '<' cause compilation error
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ogoffart at kde dot org


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


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

* [Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '<' cause compilation error
  2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
@ 2010-07-19 15:38 ` redi at gcc dot gnu dot org
  2010-07-22  8:57 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-07-19 15:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from redi at gcc dot gnu dot org  2010-07-19 15:38 -------
confirmed, this worked with gcc 4.1


-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
      Known to work|                            |4.1.2
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-19 15:38:28
               date|                            |
            Summary|default argument with '<'   |[4.4/4.5/4.6 Regression]
                   |cause compilation error     |default argument with '<'
                   |                            |cause compilation error


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


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

* [Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '<' cause compilation error
  2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
  2010-07-19 15:38 ` [Bug c++/44991] [4.4/4.5/4.6 Regression] " redi at gcc dot gnu dot org
@ 2010-07-22  8:57 ` rguenth at gcc dot gnu dot org
  2010-07-22  9:07 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-22  8:57 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.5


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


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

* [Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '<' cause compilation error
  2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
  2010-07-19 15:38 ` [Bug c++/44991] [4.4/4.5/4.6 Regression] " redi at gcc dot gnu dot org
  2010-07-22  8:57 ` rguenth at gcc dot gnu dot org
@ 2010-07-22  9:07 ` rguenth at gcc dot gnu dot org
  2010-08-25 10:00 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-22  9:07 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.4.0
      Known to work|4.1.2                       |4.1.2 4.3.4
           Priority|P3                          |P2


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


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

* [Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '<' cause compilation error
  2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
                   ` (2 preceding siblings ...)
  2010-07-22  9:07 ` rguenth at gcc dot gnu dot org
@ 2010-08-25 10:00 ` jakub at gcc dot gnu dot org
  2010-08-26  6:10 ` jason at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-08-25 10:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2010-08-25 10:00 -------
Caused by r140120 (i.e. PR37302), guess the declaration is now added during
tentative parsing which is then not committed and parsed again differently,
defining the parameter again.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org


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


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

* [Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '<' cause compilation error
  2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
                   ` (3 preceding siblings ...)
  2010-08-25 10:00 ` jakub at gcc dot gnu dot org
@ 2010-08-26  6:10 ` jason at gcc dot gnu dot org
  2010-08-29 19:24 ` jason at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-08-26  6:10 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-07-19 15:38:28         |2010-08-26 06:09:53
               date|                            |


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


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

* [Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '<' cause compilation error
  2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
                   ` (4 preceding siblings ...)
  2010-08-26  6:10 ` jason at gcc dot gnu dot org
@ 2010-08-29 19:24 ` jason at gcc dot gnu dot org
  2010-08-30 13:38 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-08-29 19:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jason at gcc dot gnu dot org  2010-08-29 19:24 -------
Subject: Bug 44991

Author: jason
Date: Sun Aug 29 19:24:37 2010
New Revision: 163629

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163629
Log:
        PR c++/44991
        * parser.c (cp_parser_parameter_declaration): Pop parameter decls
        after tentative parsing.

Added:
    trunk/gcc/testsuite/g++.dg/parse/defarg15.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '<' cause compilation error
  2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
                   ` (6 preceding siblings ...)
  2010-08-30 13:38 ` jason at gcc dot gnu dot org
@ 2010-08-30 13:38 ` jason at gcc dot gnu dot org
  2010-08-30 13:39 ` jason at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-08-30 13:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jason at gcc dot gnu dot org  2010-08-30 13:38 -------
Subject: Bug 44991

Author: jason
Date: Mon Aug 30 13:38:09 2010
New Revision: 163644

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163644
Log:
        PR c++/44991
        * parser.c (cp_parser_parameter_declaration): Pop parameter decls
        after tentative parsing.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/parse/defarg15.C
Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/parser.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '<' cause compilation error
  2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
                   ` (5 preceding siblings ...)
  2010-08-29 19:24 ` jason at gcc dot gnu dot org
@ 2010-08-30 13:38 ` jason at gcc dot gnu dot org
  2010-08-30 13:38 ` jason at gcc dot gnu dot org
  2010-08-30 13:39 ` jason at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-08-30 13:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jason at gcc dot gnu dot org  2010-08-30 13:37 -------
Subject: Bug 44991

Author: jason
Date: Mon Aug 30 13:37:34 2010
New Revision: 163643

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163643
Log:
        PR c++/44991
        * parser.c (cp_parser_parameter_declaration): Pop parameter decls
        after tentative parsing.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/parse/defarg15.C
Modified:
    branches/gcc-4_5-branch/gcc/cp/ChangeLog
    branches/gcc-4_5-branch/gcc/cp/parser.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '<' cause compilation error
  2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
                   ` (7 preceding siblings ...)
  2010-08-30 13:38 ` jason at gcc dot gnu dot org
@ 2010-08-30 13:39 ` jason at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-08-30 13:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jason at gcc dot gnu dot org  2010-08-30 13:39 -------
Fixed.


-- 

jason at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-08-30 13:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 15:20 [Bug c++/44991] New: default argument with '<' cause compilation error ogoffart at kde dot org
2010-07-19 15:38 ` [Bug c++/44991] [4.4/4.5/4.6 Regression] " redi at gcc dot gnu dot org
2010-07-22  8:57 ` rguenth at gcc dot gnu dot org
2010-07-22  9:07 ` rguenth at gcc dot gnu dot org
2010-08-25 10:00 ` jakub at gcc dot gnu dot org
2010-08-26  6:10 ` jason at gcc dot gnu dot org
2010-08-29 19:24 ` jason at gcc dot gnu dot org
2010-08-30 13:38 ` jason at gcc dot gnu dot org
2010-08-30 13:38 ` jason at gcc dot gnu dot org
2010-08-30 13:39 ` jason 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).