Bug 33464 - [4.3 regression] Broken diagnostic: 'trait_expr' not supported by dump_expr
Summary: [4.3 regression] Broken diagnostic: 'trait_expr' not supported by dump_expr
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Paolo Carlini
URL:
Keywords: diagnostic, monitored
Depends on:
Blocks:
 
Reported: 2007-09-17 22:24 UTC by Volker Reichelt
Modified: 2007-09-18 14:36 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-09-17 23:02:26


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2007-09-17 22:24:58 UTC
The following invalid testcase triggers a broken diagnostic on mainline:

===================================
template<int> void foo()
{
  __is_class(int)();
}
===================================

bug.cc: In function 'void foo()':
bug.cc:3: error: '#'trait_expr' not supported by dump_expr#<expression error>' cannot be used as a function

This is similar to PR33212, but not yet fixed.
Comment 1 paolo@gcc.gnu.org 2007-09-18 14:35:54 UTC
Subject: Bug 33464

Author: paolo
Date: Tue Sep 18 14:35:42 2007
New Revision: 128578

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

	PR c++/33464
	* cxx-pretty-print.c (pp_cxx_trait_expression): Add.
	(pp_cxx_primary_expression): Use it.
	* cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
	* error.c (dump_expr): Use it.

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

	PR c++/33464
	* g++.dg/ext/is_class_error.C: Rename to is_class_error1.C.
	* g++.dg/ext/is_class_error2.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/ext/is_class_error1.C
      - copied unchanged from r128570, trunk/gcc/testsuite/g++.dg/ext/is_class_error.C
    trunk/gcc/testsuite/g++.dg/ext/is_class_error2.C
Removed:
    trunk/gcc/testsuite/g++.dg/ext/is_class_error.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-18 14:36:33 UTC
Fixed.