Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-06-22 Thread Jeff Law
On 06/19/2018 09:13 AM, dave.pa...@oracle.com wrote: > This patch fixes spurious failure for C test added with original patch > for bug 55976. > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55976 > > Added dg-prune-output for extraneous message causing unexpected test > failure for test gcc.dg/

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-06-07 Thread Martin Liška
On 06/01/2018 11:08 PM, dave.pa...@oracle.com wrote: > Thanks for pointing this out. I'll check out what's going on and fix the issue > > --Dave Hi. Difference is in between C and C++ FEs: marxin@marxinbox:/dev/shm/objdir/gcc> ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/noncom

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-06-01 Thread dave . pagan
Thanks for pointing this out. I'll check out what's going on and fix the issue --Dave On 05/31/2018 05:53 AM, H.J. Lu wrote: On Wed, May 30, 2018 at 3:56 PM, Jeff Law wrote: On 04/22/2018 01:17 PM, dave.pa...@oracle.com wrote: This patch fixes handling of -Werror=return-type as well as -Wno

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-05-31 Thread H.J. Lu
On Wed, May 30, 2018 at 3:56 PM, Jeff Law wrote: > On 04/22/2018 01:17 PM, dave.pa...@oracle.com wrote: >> This patch fixes handling of -Werror=return-type as well as >> -Wno-return-type. Currently, -Werror=return-type does not turn the >> warnings into errors and -Wno-return-type does not turn of

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-05-30 Thread Jeff Law
On 04/22/2018 01:17 PM, dave.pa...@oracle.com wrote: > This patch fixes handling of -Werror=return-type as well as > -Wno-return-type. Currently, -Werror=return-type does not turn the > warnings into errors and -Wno-return-type does not turn off > warning/error. Now they both work as expected. > >

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-04-05 Thread dave . pagan
On 04/04/2018 07:44 PM, Martin Sebor wrote: On 04/04/2018 05:50 PM, dave.pa...@oracle.com wrote: On 04/04/2018 10:58 AM, Martin Sebor wrote: On 04/04/2018 11:15 AM, Jakub Jelinek wrote: On Tue, Apr 03, 2018 at 01:36:13PM -0600, Martin Sebor wrote: On 04/03/2018 10:26 AM, dave.pa...@oracle.com

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-04-04 Thread Martin Sebor
On 04/04/2018 05:50 PM, dave.pa...@oracle.com wrote: On 04/04/2018 10:58 AM, Martin Sebor wrote: On 04/04/2018 11:15 AM, Jakub Jelinek wrote: On Tue, Apr 03, 2018 at 01:36:13PM -0600, Martin Sebor wrote: On 04/03/2018 10:26 AM, dave.pa...@oracle.com wrote: This patch fixes handlng of -Werror=

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-04-04 Thread dave . pagan
On 04/04/2018 10:58 AM, Martin Sebor wrote: On 04/04/2018 11:15 AM, Jakub Jelinek wrote: On Tue, Apr 03, 2018 at 01:36:13PM -0600, Martin Sebor wrote: On 04/03/2018 10:26 AM, dave.pa...@oracle.com wrote: This patch fixes handlng of -Werror=return-type. Currently, even with the flag specified,

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-04-04 Thread Martin Sebor
On 04/04/2018 11:15 AM, Jakub Jelinek wrote: On Tue, Apr 03, 2018 at 01:36:13PM -0600, Martin Sebor wrote: On 04/03/2018 10:26 AM, dave.pa...@oracle.com wrote: This patch fixes handlng of -Werror=return-type. Currently, even with the flag specified, return type errors remain warnings. https://

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-04-04 Thread Jakub Jelinek
On Tue, Apr 03, 2018 at 01:36:13PM -0600, Martin Sebor wrote: > On 04/03/2018 10:26 AM, dave.pa...@oracle.com wrote: > > This patch fixes handlng of -Werror=return-type. Currently, even with > > the flag specified, return type errors remain warnings. > > > > https://gcc.gnu.org/bugzilla/show_bug.c

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-04-04 Thread dave . pagan
Hi Martin, Hadn't thought about, but you're right ... it should be consistent. Currently, -Wno-return-type has no effect on this warning, but it should. Since this patch does fix the original problem, what do you recommend? Scrap this patch? Or let it proceed and submit a new bug noting the

Re: [PATCH] c/55976 -Werror=return-type should error on returning a value from a void function

2018-04-03 Thread Martin Sebor
On 04/03/2018 10:26 AM, dave.pa...@oracle.com wrote: This patch fixes handlng of -Werror=return-type. Currently, even with the flag specified, return type errors remain warnings. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55976 Function c_finish_return (), when calling pedwarn, should specifi