This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] PR 31747


Paolo Carlini wrote:

> cp/
> 2007-09-19  Paolo Carlini  <pcarlini@suse.de>
> 
> 	PR c++/31747
> 	* decl.c (grokdeclarator): In case of conflicting specifiers
> 	just return error_mark_node.
> 
> testsuite/
> 2007-09-19  Paolo Carlini  <pcarlini@suse.de>
> 
> 	PR c++/31747
> 	* g++.dg/parse/crash38.C: New.

This is OK, but you might as well move the
declspecs->conflicting_specifier_p check all the way to the top of
grokdeclarator.  If we're just going to error out anyhow, I'm not sure
possibly issuing a few other possible error messages about other
oddities is very valuable, and by eliminating invalid inputs early we
decrease the chance of crashes.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]