public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27423]  New: Default argument for void parameter accepted
@ 2006-05-04 15:16 reichelt at gcc dot gnu dot org
  2006-05-05  0:29 ` [Bug c++/27423] ICE on default argument for void parameter reichelt at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-04 15:16 UTC (permalink / raw)
  To: gcc-bugs

The C++ frontend accepts the following invalid code snippet since at least
GCC 2.95.3:

==============================
void foo(void = 0);
void bar() { foo(); }
==============================


-- 
           Summary: Default argument for void parameter accepted
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/27423] ICE on default argument for void parameter
  2006-05-04 15:16 [Bug c++/27423] New: Default argument for void parameter accepted reichelt at gcc dot gnu dot org
@ 2006-05-05  0:29 ` reichelt at gcc dot gnu dot org
  2006-05-05  0:42 ` reichelt at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-05  0:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from reichelt at gcc dot gnu dot org  2006-05-05 00:29 -------
On mainline we now ICE:

PR27423.cc:1: error: '<anonymous>' has incomplete type
PR27423.cc:1: error: invalid use of 'void'
PR27423.cc: In function 'void bar()':
PR27423.cc:2: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in convert_for_initialization, at cp/typeck.c:6235
Please submit a full bug report, [etc.]


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|accepts-invalid             |error-recovery, ice-on-
                   |                            |invalid-code
            Summary|Default argument for void   |ICE on default argument for
                   |parameter accepted          |void parameter


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


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

* [Bug c++/27423] ICE on default argument for void parameter
  2006-05-04 15:16 [Bug c++/27423] New: Default argument for void parameter accepted reichelt at gcc dot gnu dot org
  2006-05-05  0:29 ` [Bug c++/27423] ICE on default argument for void parameter reichelt at gcc dot gnu dot org
@ 2006-05-05  0:42 ` reichelt at gcc dot gnu dot org
  2006-05-05  7:23 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-05  0:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from reichelt at gcc dot gnu dot org  2006-05-05 00:42 -------
Testing a patch.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |reichelt at gcc dot gnu dot
                   |dot org                     |org


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


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

* [Bug c++/27423] ICE on default argument for void parameter
  2006-05-04 15:16 [Bug c++/27423] New: Default argument for void parameter accepted reichelt at gcc dot gnu dot org
  2006-05-05  0:29 ` [Bug c++/27423] ICE on default argument for void parameter reichelt at gcc dot gnu dot org
  2006-05-05  0:42 ` reichelt at gcc dot gnu dot org
@ 2006-05-05  7:23 ` pinskia at gcc dot gnu dot org
  2006-05-05 20:05 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-05  7:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-05-05 07:23 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-05-05 07:23:47
               date|                            |


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


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

* [Bug c++/27423] ICE on default argument for void parameter
  2006-05-04 15:16 [Bug c++/27423] New: Default argument for void parameter accepted reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-05-05  7:23 ` pinskia at gcc dot gnu dot org
@ 2006-05-05 20:05 ` patchapp at dberlin dot org
  2006-05-06  0:32 ` reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: patchapp at dberlin dot org @ 2006-05-05 20:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from patchapp at dberlin dot org  2006-05-05 20:04 -------
Subject: Bug number PR c++/27423

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00206.html


-- 


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


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

* [Bug c++/27423] ICE on default argument for void parameter
  2006-05-04 15:16 [Bug c++/27423] New: Default argument for void parameter accepted reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-05-05 20:05 ` patchapp at dberlin dot org
@ 2006-05-06  0:32 ` reichelt at gcc dot gnu dot org
  2006-05-06  0:36 ` reichelt at gcc dot gnu dot org
  2006-05-15 19:34 ` patchapp at dberlin dot org
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-06  0:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from reichelt at gcc dot gnu dot org  2006-05-06 00:32 -------
Subject: Bug 27423

Author: reichelt
Date: Sat May  6 00:32:27 2006
New Revision: 113571

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113571
Log:
        PR c++/27423
        * typeck.c (convert_for_initialization): Skip erroneous types.

        * g++.dg/other/void2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/other/void2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/27423] ICE on default argument for void parameter
  2006-05-04 15:16 [Bug c++/27423] New: Default argument for void parameter accepted reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-05-06  0:32 ` reichelt at gcc dot gnu dot org
@ 2006-05-06  0:36 ` reichelt at gcc dot gnu dot org
  2006-05-15 19:34 ` patchapp at dberlin dot org
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-06  0:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from reichelt at gcc dot gnu dot org  2006-05-06 00:36 -------
Fixed on mainline.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.2.0


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


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

* [Bug c++/27423] ICE on default argument for void parameter
  2006-05-04 15:16 [Bug c++/27423] New: Default argument for void parameter accepted reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-05-06  0:36 ` reichelt at gcc dot gnu dot org
@ 2006-05-15 19:34 ` patchapp at dberlin dot org
  6 siblings, 0 replies; 8+ messages in thread
From: patchapp at dberlin dot org @ 2006-05-15 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from patchapp at dberlin dot org  2006-05-15 19:33 -------
Subject: Bug number PR c++/27423

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00206.html


-- 


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


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

end of thread, other threads:[~2006-05-15 19:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 15:16 [Bug c++/27423] New: Default argument for void parameter accepted reichelt at gcc dot gnu dot org
2006-05-05  0:29 ` [Bug c++/27423] ICE on default argument for void parameter reichelt at gcc dot gnu dot org
2006-05-05  0:42 ` reichelt at gcc dot gnu dot org
2006-05-05  7:23 ` pinskia at gcc dot gnu dot org
2006-05-05 20:05 ` patchapp at dberlin dot org
2006-05-06  0:32 ` reichelt at gcc dot gnu dot org
2006-05-06  0:36 ` reichelt at gcc dot gnu dot org
2006-05-15 19:34 ` patchapp at dberlin 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).