Please see updated patch file attached, which now includes a fixed/added regression test.

Sjoerd.

 

From: Sjoerd Meijer
Sent: 17 August 2015 13:34
To: 'Gabriel Dos Reis'; Richard Smith
Cc: Marshall Clow; cfe-commits
Subject: RE: [PATCH] RE: [cfe-dev] missing return statement for non-void functions in C++

 

Agreed, let’s get that right first.

The attached patch causes the program to trap for all optimizations levels, except when optimizing for size.

 

Sjoerd.

 

From: dosreis@gmail.com [mailto:dosreis@gmail.com] On Behalf Of Gabriel Dos Reis
Sent: 13 August 2015 21:51
To: Richard Smith
Cc: Sjoerd Meijer; Marshall Clow; cfe-commits
Subject: Re: [PATCH] RE: [cfe-dev] missing return statement for non-void functions in C++

 

Please make such programs crash early and often.  They are a nightmare to maintain.  Make them blow in the face of the original authors; not after they are gone.

 

-- Gaby