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

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