public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters
@ 2004-02-23 16:43 mueller at kde dot org
  2004-02-23 16:44 ` [Bug c++/14260] " mueller at kde dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: mueller at kde dot org @ 2004-02-23 16:43 UTC (permalink / raw)
  To: gcc-bugs

Hi,  
 
testcase:  
 
== Cut == 
template <class TClass> 
class T 
{ 
public: 
        T(short,short f=0) {} 
        T<TClass>(int f) {} 
        T<TClass>(int f=0,const char* b=0) {} 
}; 
=== Cut === 
produces : 
 
$  g++ -v -Wall -ansi -pedantic -c kircfunctors.cpp  
.. 
gcc version 3.4.0 20040220 (prerelease) 
... 
kircfunctors.cpp:7: error: default arguments are only permitted for function 
parameters 
kircfunctors.cpp:7: error: default arguments are only permitted for function 
parameters 
 
Something is inconsistent here.. either it should reject declaration 2 
and 3, or none of them (like gcc 3.3.x does for me). The diagnostic is  
showing that it has some problems parsing this correctly.

-- 
           Summary: [3.4 REGRESSION] default arguments are only permitted
                    for function parameters
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mueller at kde dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/14260] [3.4 REGRESSION] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
@ 2004-02-23 16:44 ` mueller at kde dot org
  2004-02-23 16:49 ` [Bug c++/14260] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mueller at kde dot org @ 2004-02-23 16:44 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic, rejects-valid


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


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

* [Bug c++/14260] [3.4/3.5 Regression] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
  2004-02-23 16:44 ` [Bug c++/14260] " mueller at kde dot org
@ 2004-02-23 16:49 ` pinskia at gcc dot gnu dot org
  2004-03-01 18:32 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-23 16:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-23 16:49 -------
Confirmed. A regression.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3.1
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-23 16:49:09
               date|                            |
            Summary|[3.4 REGRESSION] default    |[3.4/3.5 Regression] default
                   |arguments are only permitted|arguments are only permitted
                   |for function parameters     |for function parameters
   Target Milestone|---                         |3.4.0


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


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

* [Bug c++/14260] [3.4/3.5 Regression] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
  2004-02-23 16:44 ` [Bug c++/14260] " mueller at kde dot org
  2004-02-23 16:49 ` [Bug c++/14260] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-03-01 18:32 ` mmitchel at gcc dot gnu dot org
  2004-03-01 20:38 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-01 18:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-01 18:32 -------
Working on a fix.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/14260] [3.4/3.5 Regression] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
                   ` (2 preceding siblings ...)
  2004-03-01 18:32 ` mmitchel at gcc dot gnu dot org
@ 2004-03-01 20:38 ` cvs-commit at gcc dot gnu dot org
  2004-03-01 20:39 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-01 20:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-01 20:38 -------
Subject: Bug 14260

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-03-01 20:38:31

Modified files:
	gcc/cp         : ChangeLog lex.c parser.c pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/abi: mangle21.C 
	gcc/testsuite/g++.dg/parse: constructor2.C 
	gcc/testsuite/g++.dg/template: sfinae1.C 

Log message:
	PR c++/14324
	* lex.c (retrofit_lang_decl): Treat entities with no linkage as
	having C++ linkage for name-mangling purposes.
	
	PR c++/14260
	* parser.c (cp_parser_direct_declarator): Recognize constructor
	declarators that use a template-id to name the class being
	constructed.
	
	PR c++/14337
	* pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
	(tsubst_expr): Do not call tsubst_copy, even when
	processing_template_decl.
	
	PR c++/14324
	* g++.dg/abi/mangle21.C: New test.
	
	PR c++/14260
	* g++.dg/parse/constructor2.C: New test.
	
	PR c++/14337
	* g++.dg/template/sfinae1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3979&r2=1.3980
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/lex.c.diff?cvsroot=gcc&r1=1.324&r2=1.325
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.177&r2=1.178
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.833&r2=1.834
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3559&r2=1.3560
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/abi/mangle21.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/constructor2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/sfinae1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/14260] [3.4/3.5 Regression] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
                   ` (3 preceding siblings ...)
  2004-03-01 20:38 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-01 20:39 ` cvs-commit at gcc dot gnu dot org
  2004-03-01 20:40 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-01 20:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-01 20:39 -------
Subject: Bug 14260

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-03-01 20:39:14

Modified files:
	gcc/cp         : lex.c parser.c pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/abi: mangle21.C 
	gcc/testsuite/g++.dg/parse: constructor2.C 
	gcc/testsuite/g++.dg/template: sfinae1.C 

Log message:
	PR c++/14324
	* lex.c (retrofit_lang_decl): Treat entities with no linkage as
	having C++ linkage for name-mangling purposes.
	
	PR c++/14260
	* parser.c (cp_parser_direct_declarator): Recognize constructor
	declarators that use a template-id to name the class being
	constructed.
	
	PR c++/14337
	* pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
	(tsubst_expr): Do not call tsubst_copy, even when
	processing_template_decl.
	
	PR c++/14324
	* g++.dg/abi/mangle21.C: New test.
	
	PR c++/14260
	* g++.dg/parse/constructor2.C: New test.
	
	PR c++/14337
	* g++.dg/template/sfinae1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/lex.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.323.2.1&r2=1.323.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.16&r2=1.157.2.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.14&r2=1.816.2.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.114&r2=1.3389.2.115
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/abi/mangle21.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/constructor2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/sfinae1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/14260] [3.4/3.5 Regression] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
                   ` (4 preceding siblings ...)
  2004-03-01 20:39 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-01 20:40 ` mmitchel at gcc dot gnu dot org
  2004-03-22 14:26 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-01 20:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-01 20:40 -------
Fixed in GCC 3.4.

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


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


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

* [Bug c++/14260] [3.4/3.5 Regression] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
                   ` (5 preceding siblings ...)
  2004-03-01 20:40 ` mmitchel at gcc dot gnu dot org
@ 2004-03-22 14:26 ` cvs-commit at gcc dot gnu dot org
  2004-03-22 14:30 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-22 14:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-22 14:26 -------
Subject: Bug 14260

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	joel@gcc.gnu.org	2004-03-22 14:26:02

Modified files:
	gcc            : ChangeLog 
	gcc/config     : rtems.h 

Log message:
	2004-03-17  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
	
	PR target/14260
	* config/rtems.h: Add STD_LIB_SPEC and LIB_SPEC.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.947&r2=1.16114.2.948
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rtems.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3&r2=1.3.20.1



-- 


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


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

* [Bug c++/14260] [3.4/3.5 Regression] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
                   ` (6 preceding siblings ...)
  2004-03-22 14:26 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-22 14:30 ` cvs-commit at gcc dot gnu dot org
  2004-03-22 16:19 ` bangerth at dealii dot org
  2004-05-03 14:57 ` ruben at ugr dot es
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-22 14:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-22 14:30 -------
Subject: Bug 14260

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	joel@gcc.gnu.org	2004-03-22 14:29:48

Modified files:
	gcc            : ChangeLog 
	gcc/config     : rtems.h 

Log message:
	2004-03-22  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
	
	PR target/14260
	* config/rtems.h: Add STD_LIB_SPEC and LIB_SPEC.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.361&r2=2.2326.2.362
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rtems.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.4&r2=1.4.14.1



-- 


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


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

* [Bug c++/14260] [3.4/3.5 Regression] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
                   ` (7 preceding siblings ...)
  2004-03-22 14:30 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-22 16:19 ` bangerth at dealii dot org
  2004-05-03 14:57 ` ruben at ugr dot es
  9 siblings, 0 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-03-22 16:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-03-22 16:19 -------
The patches listed in the last two messages to this PR were actually 
meant to reference PR 14620 instead. 

-- 


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


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

* [Bug c++/14260] [3.4/3.5 Regression] default arguments are only permitted for function parameters
  2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
                   ` (8 preceding siblings ...)
  2004-03-22 16:19 ` bangerth at dealii dot org
@ 2004-05-03 14:57 ` ruben at ugr dot es
  9 siblings, 0 replies; 11+ messages in thread
From: ruben at ugr dot es @ 2004-05-03 14:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ruben at ugr dot es  2004-05-03 14:57 -------
3.3.2 and 3.3.3 confirmed Known to work as well

-- 


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


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

end of thread, other threads:[~2004-05-03 14:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-23 16:43 [Bug c++/14260] New: [3.4 REGRESSION] default arguments are only permitted for function parameters mueller at kde dot org
2004-02-23 16:44 ` [Bug c++/14260] " mueller at kde dot org
2004-02-23 16:49 ` [Bug c++/14260] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-03-01 18:32 ` mmitchel at gcc dot gnu dot org
2004-03-01 20:38 ` cvs-commit at gcc dot gnu dot org
2004-03-01 20:39 ` cvs-commit at gcc dot gnu dot org
2004-03-01 20:40 ` mmitchel at gcc dot gnu dot org
2004-03-22 14:26 ` cvs-commit at gcc dot gnu dot org
2004-03-22 14:30 ` cvs-commit at gcc dot gnu dot org
2004-03-22 16:19 ` bangerth at dealii dot org
2004-05-03 14:57 ` ruben at ugr dot es

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).