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: Really fix PR18596


"Joseph S. Myers" <joseph@codesourcery.com> writes:

> On Sun, 19 Dec 2004, James A. Morrison wrote:
> 
> >  Right, I can avoid the syntax error using
> > if ($<ttype>$)
> >   start_init (...);
> > ...
> > if (!$<ttype>5)
> >   break;
> > finish_init ...
> 
> I don't think you want a break outside a switch or loop, and start_init 
> works without a decl to initialize (for compound literals) so it should be 
> possible for start_init and finish_init to be called even in this error 
> case (and so ensure that calls to them always bracket initializer 
> parsing).

 start_init and finish_init seem to be ok without a decl.  Unfortunatly
really_start_incrementatl_init and other functions called from the init
rule don't work well without a decl.

 The current failing case is: static int g () = { 0 }; 

> -- 
> Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
>     jsm@polyomino.org.uk (personal mail)
>     joseph@codesourcery.com (CodeSourcery mail)
>     jsm28@gcc.gnu.org (Bugzilla assignments and CCs)
> 


-- 
Thanks,
Jim

http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim


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