public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3779: Accepts illegal C++ code: redefinition of default argument
@ 2001-07-23 15:03 ljrittle
  0 siblings, 0 replies; 2+ messages in thread
From: ljrittle @ 2001-07-23 15:03 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, pere

Synopsis: Accepts illegal C++ code: redefinition of default argument

State-Changed-From-To: open->closed
State-Changed-By: ljrittle
State-Changed-When: Mon Jul 23 15:03:43 2001
State-Changed-Why:
    Before reporting standard compliance issues related to
    gcc please try compiling with -pedantic.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3779&database=gcc


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

* c++/3779: Accepts illegal C++ code: redefinition of default argument
@ 2001-07-23 11:56 Petter Reinholdtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Petter Reinholdtsen @ 2001-07-23 11:56 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3779
>Category:       c++
>Synopsis:       Accepts illegal C++ code: redefinition of default argument
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 23 11:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Petter Reinholdtsen
>Release:        3.1 20010615 (experimental)
>Organization:
Hungry Programmers
>Environment:
System: Linux zoot 2.2.18 #3 SMP Thu Jan 18 16:29:19 CET 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../configure --prefix=/store/opt/gcc-cvs --program-prefix=pre3-
>Description:
	The CVS version of GCC accepts redefinition of default
	arguments.  This is illegal C++ and generates an error on
	SGI Irix C++ and Compaq C++.  It should be rejected on gcc as
	well.
>How-To-Repeat:
	Compile the following code.  It should generate an error, but
	gcc accept.

		class T {
		public:
		  T(int i = 0);
		private:
		  int m_i;
		};

		T::T(int i = 0) // This line is illegal
		  : m_i(i)
		{
		}

	It is only legal to specify default parameters in the prototype.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2001-07-23 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-23 15:03 c++/3779: Accepts illegal C++ code: redefinition of default argument ljrittle
  -- strict thread matches above, loose matches on Subject: below --
2001-07-23 11:56 Petter Reinholdtsen

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