Re: [PATCH] Prevent 'control reaches end of non-void function' warning for DO_WHILE

2012-04-17 Thread Jason Merrill
OK, thanks. Jason

Re: [PATCH] Prevent 'control reaches end of non-void function' warning for DO_WHILE

2012-04-17 Thread Tom de Vries
On 16/04/12 16:23, Jason Merrill wrote: > On 04/14/2012 05:43 PM, Tom de Vries wrote: >> + tree expr = NULL; >> + append_to_statement_list (*block,&expr); >> + *block = expr; Rather than doing this dance here, I think it would be better to enhance appe

Re: [PATCH] Prevent 'control reaches end of non-void function' warning for DO_WHILE

2012-04-16 Thread Jason Merrill
On 04/14/2012 05:43 PM, Tom de Vries wrote: >> + tree expr = NULL; >> + append_to_statement_list (*block,&expr); >> + *block = expr; > > Rather than doing this dance here, I think it would be better to enhance > append_to_statement_list to handle the case of the list argument

Re: [PATCH] Prevent 'control reaches end of non-void function' warning for DO_WHILE

2012-04-14 Thread Tom de Vries
Jason, On 18/02/12 09:33, Jason Merrill wrote: > On 01/22/2012 03:38 AM, Tom de Vries wrote: > > Sorry I didn't notice this patch until now; please CC me on C++ patches, > or at least mention C++ in the subject line. > OK, will do. >> + tree expr = NULL; >> + append_to_statement_lis

Re: [PATCH] Prevent 'control reaches end of non-void function' warning for DO_WHILE

2012-02-18 Thread Jason Merrill
On 01/22/2012 03:38 AM, Tom de Vries wrote: Sorry I didn't notice this patch until now; please CC me on C++ patches, or at least mention C++ in the subject line. + tree expr = NULL; + append_to_statement_list (*block, &expr); + *block = expr; Rather than doing this dance here

Re: [PATCH] Prevent 'control reaches end of non-void function' warning for DO_WHILE

2012-01-22 Thread Tom de Vries
On 09/12/11 10:45, Richard Guenther wrote: > On Fri, Dec 9, 2011 at 9:38 AM, Tom de Vries wrote: >> Jakub, >> >> This patch fixes the problem reported in >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25973#c4 . >> >> The test-case listed there is: >> ... >> struct Block >> { >> public: >>Blo

Re: [PATCH] Prevent 'control reaches end of non-void function' warning for DO_WHILE

2011-12-09 Thread Richard Guenther
On Fri, Dec 9, 2011 at 9:38 AM, Tom de Vries wrote: > Jakub, > > This patch fixes the problem reported in > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25973#c4 . > > The test-case listed there is: > ... > struct Block > { >  public: >    Block(); >    ~Block(); > }; > > bool func( bool bar ) > {

[PATCH] Prevent 'control reaches end of non-void function' warning for DO_WHILE

2011-12-09 Thread Tom de Vries
Jakub, This patch fixes the problem reported in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25973#c4 . The test-case listed there is: ... struct Block { public: Block(); ~Block(); }; bool func( bool bar ) { Block block; bool foo = false; if( !foo || bar ) do { return true; }