public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28988]  New: g++ does not check first type name in pseudo-destructor-name
@ 2006-09-08 19:02 amylaar at gcc dot gnu dot org
  2006-09-09  4:16 ` [Bug c++/28988] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-09-08 19:02 UTC (permalink / raw)
  To: gcc-bugs

The following code is accepted, contrary to clause 5.2.4:

typedef int C;
typedef double D;

void
f ()
{
  C o;

  o.D::~C ();
}


-- 
           Summary: g++ does not check first type name in pseudo-destructor-
                    name
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org


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


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

* [Bug c++/28988] [4.0/4.1/4.2 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
@ 2006-09-09  4:16 ` pinskia at gcc dot gnu dot org
  2006-09-09  6:40 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-09  4:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-09-09 04:16 -------
Confirmed, another regression from 3.3.3:
t.cc: In function `void f()':
t.cc:9: qualified type `double' does not match destructor name `~C'
t.cc:9: type of `o' does not match destructor type `double' (type was `C'


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |3.4.0 4.0.0 4.1.0 4.2.0
      Known to work|                            |3.3.3 2.95.3 3.0.4 3.2.3
   Last reconfirmed|0000-00-00 00:00:00         |2006-09-09 04:16:24
               date|                            |
            Summary|g++ does not check first    |[4.0/4.1/4.2 Regression] g++
                   |type name in pseudo-        |does not check first type
                   |destructor-name             |name in pseudo-destructor-
                   |                            |name
   Target Milestone|---                         |4.0.4


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


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

* [Bug c++/28988] [4.0/4.1/4.2 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
  2006-09-09  4:16 ` [Bug c++/28988] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-09-09  6:40 ` pinskia at gcc dot gnu dot org
  2006-09-09 21:22 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-09  6:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-09-09 06:40 -------
lookup_destructor has become dead code which did the checking at least on the
mainline.
finish_pseudo_destructor_expr is where the new code is now.
Adding:
      if (scope && !check_dtor_name (scope, destructor))
        {
          error ("qualified type %qT does not match destructor name ~%qT",
                 scope, destructor);
          return error_mark_node;
        }
To finish_pseudo_destructor_expr fixes this bug.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/28988] [4.0/4.1/4.2 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
  2006-09-09  4:16 ` [Bug c++/28988] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
  2006-09-09  6:40 ` pinskia at gcc dot gnu dot org
@ 2006-09-09 21:22 ` pinskia at gcc dot gnu dot org
  2006-09-10 22:10 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-09 21:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-09-09 21:22 -------
Mine.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/28988] [4.0/4.1/4.2 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-09-09 21:22 ` pinskia at gcc dot gnu dot org
@ 2006-09-10 22:10 ` mmitchel at gcc dot gnu dot org
  2006-09-14  6:39 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-10 22:10 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/28988] [4.0/4.1/4.2 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-09-10 22:10 ` mmitchel at gcc dot gnu dot org
@ 2006-09-14  6:39 ` pinskia at gcc dot gnu dot org
  2006-09-26 16:59 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-14  6:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-09-14 06:38 -------
(In reply to comment #2)
> Adding:
....
> To finish_pseudo_destructor_expr fixes this bug.

This caused two regressions which I still need to look into, both are ICEs.


-- 


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


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

* [Bug c++/28988] [4.0/4.1/4.2 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-09-14  6:39 ` pinskia at gcc dot gnu dot org
@ 2006-09-26 16:59 ` pinskia at gcc dot gnu dot org
  2007-01-27 22:30 ` [Bug c++/28988] [4.0/4.1/4.2/4.3 " steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-26 16:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-09-26 16:59 -------
Just needed to add a check for types before calling check_dtor_name.
Testing the new fix right now.


-- 


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


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

* [Bug c++/28988] [4.0/4.1/4.2/4.3 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-09-26 16:59 ` pinskia at gcc dot gnu dot org
@ 2007-01-27 22:30 ` steven at gcc dot gnu dot org
  2007-01-28 18:09 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-01-27 22:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from steven at gcc dot gnu dot org  2007-01-27 22:30 -------
Approval of the patch at
http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01429.html was posted today:
http://gcc.gnu.org/ml/gcc-patches/2007-01/msg02253.html


-- 


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


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

* [Bug c++/28988] [4.0/4.1/4.2/4.3 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-01-27 22:30 ` [Bug c++/28988] [4.0/4.1/4.2/4.3 " steven at gcc dot gnu dot org
@ 2007-01-28 18:09 ` pinskia at gcc dot gnu dot org
  2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-28 18:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2007-01-28 18:09 -------
Subject: Bug 28988

Author: pinskia
Date: Sun Jan 28 18:09:25 2007
New Revision: 121261

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121261
Log:
2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * semantics.c (finish_pseudo_destructor_expr): Check the
        destrutor name by calling check_dtor_name.

2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * g++.dg/expr/dtor4.C: New test.




Added:
    trunk/gcc/testsuite/g++.dg/expr/dtor4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/28988] [4.0/4.1/4.2/4.3 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
@ 2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-28 18:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2007-01-28 18:19 -------
Subject: Bug 28988

Author: pinskia
Date: Sun Jan 28 18:18:54 2007
New Revision: 121263

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121263
Log:
2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * semantics.c (finish_pseudo_destructor_expr): Check the
        destrutor name by calling check_dtor_name.

2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * g++.dg/expr/dtor4.C: New test.



Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/expr/dtor4.C
      - copied unchanged from r121261, trunk/gcc/testsuite/g++.dg/expr/dtor4.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/semantics.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


------- Comment #9 from pinskia at gcc dot gnu dot org  2007-01-28 18:19 -------
Subject: Bug 28988

Author: pinskia
Date: Sun Jan 28 18:18:52 2007
New Revision: 121262

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121262
Log:
2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * semantics.c (finish_pseudo_destructor_expr): Check the
        destrutor name by calling check_dtor_name.

2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * g++.dg/expr/dtor4.C: New test.



Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/expr/dtor4.C
      - copied unchanged from r121261, trunk/gcc/testsuite/g++.dg/expr/dtor4.C
Modified:
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/semantics.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/28988] [4.0/4.1/4.2/4.3 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
@ 2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
  2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-28 18:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2007-01-28 18:19 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/28988] [4.0/4.1/4.2/4.3 Regression] g++ does not check first type name in pseudo-destructor-name
  2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-01-28 18:09 ` pinskia at gcc dot gnu dot org
@ 2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
  2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
  2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-28 18:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2007-01-28 18:19 -------
Subject: Bug 28988

Author: pinskia
Date: Sun Jan 28 18:18:54 2007
New Revision: 121263

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121263
Log:
2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * semantics.c (finish_pseudo_destructor_expr): Check the
        destrutor name by calling check_dtor_name.

2007-01-28  Andrew Pinski  <pinskia@gmail.com>

        PR C++/28988
        * g++.dg/expr/dtor4.C: New test.



Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/expr/dtor4.C
      - copied unchanged from r121261, trunk/gcc/testsuite/g++.dg/expr/dtor4.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/semantics.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2007-01-28 18:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-08 19:02 [Bug c++/28988] New: g++ does not check first type name in pseudo-destructor-name amylaar at gcc dot gnu dot org
2006-09-09  4:16 ` [Bug c++/28988] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-09-09  6:40 ` pinskia at gcc dot gnu dot org
2006-09-09 21:22 ` pinskia at gcc dot gnu dot org
2006-09-10 22:10 ` mmitchel at gcc dot gnu dot org
2006-09-14  6:39 ` pinskia at gcc dot gnu dot org
2006-09-26 16:59 ` pinskia at gcc dot gnu dot org
2007-01-27 22:30 ` [Bug c++/28988] [4.0/4.1/4.2/4.3 " steven at gcc dot gnu dot org
2007-01-28 18:09 ` pinskia at gcc dot gnu dot org
2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
2007-01-28 18:19 ` pinskia at gcc dot gnu dot org
2007-01-28 18:19 ` pinskia 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).