public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38794]  New: [4.2/4.3/4.4 regression] Function body accepted in typedef
@ 2009-01-10 16:47 reichelt at gcc dot gnu dot org
  2009-01-10 16:47 ` [Bug c++/38794] " reichelt at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-01-10 16:47 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet is accepted in GCC 4.2.0:

=======================
typedef int foo() {}
=======================


-- 
           Summary: [4.2/4.3/4.4 regression] Function body accepted in
                    typedef
           Product: gcc
           Version: 4.4.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=38794


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

* [Bug c++/38794] [4.2/4.3/4.4 regression] Function body accepted in typedef
  2009-01-10 16:47 [Bug c++/38794] New: [4.2/4.3/4.4 regression] Function body accepted in typedef reichelt at gcc dot gnu dot org
@ 2009-01-10 16:47 ` reichelt at gcc dot gnu dot org
  2009-01-10 16:48 ` reichelt at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-01-10 16:47 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.5


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


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

* [Bug c++/38794] [4.2/4.3/4.4 regression] Function body accepted in typedef
  2009-01-10 16:47 [Bug c++/38794] New: [4.2/4.3/4.4 regression] Function body accepted in typedef reichelt at gcc dot gnu dot org
  2009-01-10 16:47 ` [Bug c++/38794] " reichelt at gcc dot gnu dot org
@ 2009-01-10 16:48 ` reichelt at gcc dot gnu dot org
  2009-01-12 11:41 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-01-10 16:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from reichelt at gcc dot gnu dot org  2009-01-10 16:48 -------
> The following invalid code snippet is accepted in GCC 4.2.0:

That should be "since GCC 4.2.0".


-- 


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


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

* [Bug c++/38794] [4.2/4.3/4.4 regression] Function body accepted in typedef
  2009-01-10 16:47 [Bug c++/38794] New: [4.2/4.3/4.4 regression] Function body accepted in typedef reichelt at gcc dot gnu dot org
  2009-01-10 16:47 ` [Bug c++/38794] " reichelt at gcc dot gnu dot org
  2009-01-10 16:48 ` reichelt at gcc dot gnu dot org
@ 2009-01-12 11:41 ` jakub at gcc dot gnu dot org
  2009-01-12 15:43 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-12 11:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2009-01-12 11:41 -------
Introduced by PR27102 patch.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-12 11:41:21
               date|                            |


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


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

* [Bug c++/38794] [4.2/4.3/4.4 regression] Function body accepted in typedef
  2009-01-10 16:47 [Bug c++/38794] New: [4.2/4.3/4.4 regression] Function body accepted in typedef reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-01-12 11:41 ` jakub at gcc dot gnu dot org
@ 2009-01-12 15:43 ` jakub at gcc dot gnu dot org
  2009-01-12 15:46 ` [Bug c++/38794] [4.2/4.3 " jakub at gcc dot gnu dot org
  2009-01-21 22:15 ` rguenth at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-12 15:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2009-01-12 15:43 -------
Subject: Bug 38794

Author: jakub
Date: Mon Jan 12 15:43:22 2009
New Revision: 143292

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143292
Log:
        PR c++/38794
        * decl.c (start_function): If grokdeclarator hasn't returned
        FUNCTION_DECL nor error_mark_node, issue diagnostics.

        * g++.dg/parse/typedef9.C: New test.

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


-- 


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


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

* [Bug c++/38794] [4.2/4.3 regression] Function body accepted in typedef
  2009-01-10 16:47 [Bug c++/38794] New: [4.2/4.3/4.4 regression] Function body accepted in typedef reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-01-12 15:43 ` jakub at gcc dot gnu dot org
@ 2009-01-12 15:46 ` jakub at gcc dot gnu dot org
  2009-01-21 22:15 ` rguenth at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-12 15:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2009-01-12 15:45 -------
Fixed on the trunk so far.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3/4.4 regression]    |[4.2/4.3 regression]
                   |Function body accepted in   |Function body accepted in
                   |typedef                     |typedef


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


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

* [Bug c++/38794] [4.2/4.3 regression] Function body accepted in typedef
  2009-01-10 16:47 [Bug c++/38794] New: [4.2/4.3/4.4 regression] Function body accepted in typedef reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-01-12 15:46 ` [Bug c++/38794] [4.2/4.3 " jakub at gcc dot gnu dot org
@ 2009-01-21 22:15 ` rguenth at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-21 22:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-01-21 22:15 -------
Fixed for GCC 4.4, not worth fixing on the branches.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|                            |4.2.4 4.3.2
      Known to work|                            |4.4.0
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.4.0


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


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

end of thread, other threads:[~2009-01-21 22:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-10 16:47 [Bug c++/38794] New: [4.2/4.3/4.4 regression] Function body accepted in typedef reichelt at gcc dot gnu dot org
2009-01-10 16:47 ` [Bug c++/38794] " reichelt at gcc dot gnu dot org
2009-01-10 16:48 ` reichelt at gcc dot gnu dot org
2009-01-12 11:41 ` jakub at gcc dot gnu dot org
2009-01-12 15:43 ` jakub at gcc dot gnu dot org
2009-01-12 15:46 ` [Bug c++/38794] [4.2/4.3 " jakub at gcc dot gnu dot org
2009-01-21 22:15 ` rguenth 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).