[C++ Patch] PR 30302

Paolo Carlini pcarlini@suse.de
Wed Sep 5 09:26:00 GMT 2007


Hi again Mark,

>>/cp
>>2007-09-03  Paolo Carlini  <pcarlini@suse.de>
>>
>>	PR c++/30302
>>	* semantics.c (finish_id_expression): Check that path != NULL_TREE
>>	before using TYPE_BINFO on it.
>>	* class.c (finish_struct_anon): Deal correctly with anonymous
>>	structs (vs unions, as GNU extension) in error messages.
>>
>>/testsuite
>>2007-09-03  Paolo Carlini  <pcarlini@suse.de>
>>
>>	PR c++/30302
>>	* g++.dg/ext/anon-struct5.C: New.
>>    
>>
>The class.c changes are fine, as is the new test case.
>
>I don't quite understand the finish_id_expression change; is this
>something that could happen with unions too, or is it special for structs?
>  
>
In fact it happens (the internal compiler error, that is, or "confused 
by earlier errors, bailing out" in release compilers) with anonymous 
unions too, would be the second part of the testcase:

struct B
{
  union { static int i; };
  void foo() { i; }
};

Shall I name the testcase differently, maybe?

Paolo.



More information about the Gcc-patches mailing list