Bug 33493 - [4.1 regression] Broken diagnostic: 'dl_expr' not supported by dump_expr
Summary: [4.1 regression] Broken diagnostic: 'dl_expr' not supported by dump_expr
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.0
: P2 normal
Target Milestone: 4.2.3
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic, monitored
Depends on:
Blocks:
 
Reported: 2007-09-19 06:43 UTC by Volker Reichelt
Modified: 2008-07-04 16:14 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.2.3
Known to fail: 4.1.3
Last reconfirmed: 2007-09-26 02:05:44


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2007-09-19 06:43:14 UTC
The C++ frontend generates a broken diagnostic for the following code
snippet since GCC 3.4.0:

==============================================
template<int> void foo() { delete 0 ? 1 : 0; }
==============================================

bug.cc: In function 'void foo()':
bug.cc:1: error: could not convert '#'dl_expr' not supported by dump_expr#<expression error>' to 'bool'
Comment 1 paolo@gcc.gnu.org 2007-09-27 09:21:10 UTC
Subject: Bug 33493

Author: paolo
Date: Thu Sep 27 09:20:59 2007
New Revision: 128831

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128831
Log:
/cp
2007-09-27  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33493
	* error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
	* cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
	spaces in the formatting.
	* cxx-pretty-print.h (pp_cxx_delete_expression): Declare.

/testsuite
2007-09-27  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33493
	* g++.dg/template/error31.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/template/error31.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cxx-pretty-print.c
    trunk/gcc/cp/cxx-pretty-print.h
    trunk/gcc/cp/error.c
    trunk/gcc/testsuite/ChangeLog

Comment 2 Paolo Carlini 2007-09-27 09:24:05 UTC
Fixed in mainline.
Comment 3 Volker Reichelt 2008-01-02 23:48:13 UTC
Subject: Bug 33493

Author: reichelt
Date: Wed Jan  2 23:47:08 2008
New Revision: 131267

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131267
Log:
	Backport:
	2007-09-27  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33493
	* error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
	* cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
	spaces in the formatting.
	* cxx-pretty-print.h (pp_cxx_delete_expression): Declare.

	* g++.dg/template/error31.C: New.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/error31.C
Modified:
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/cxx-pretty-print.c
    branches/gcc-4_2-branch/gcc/cp/cxx-pretty-print.h
    branches/gcc-4_2-branch/gcc/cp/error.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog

Comment 4 Volker Reichelt 2008-01-02 23:55:32 UTC
Now also fixed in gcc 4.2.3.
Comment 5 Joseph S. Myers 2008-07-04 16:14:22 UTC
Closing 4.1 branch.