Re: [Patch] PR55189 enable -Wreturn-type by default

2014-08-20 Thread Sylvestre Ledru
On 20/08/2014 00:02, Joseph S. Myers wrote: On Fri, 15 Aug 2014, Sylvestre Ledru wrote: It is indeed useless. I removed it. Thanks http://sylvestre.ledru.info/0001-Enable-warning-Wreturn-type-by-default.patch I don't think most of the testsuite changes in this patch should be needed, and we

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-08-20 Thread Joseph S. Myers
On Wed, 20 Aug 2014, Sylvestre Ledru wrote: On 20/08/2014 00:02, Joseph S. Myers wrote: On Fri, 15 Aug 2014, Sylvestre Ledru wrote: It is indeed useless. I removed it. Thanks http://sylvestre.ledru.info/0001-Enable-warning-Wreturn-type-by-default.patch I don't think most of the

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-08-19 Thread Joseph S. Myers
On Fri, 15 Aug 2014, Sylvestre Ledru wrote: It is indeed useless. I removed it. Thanks http://sylvestre.ledru.info/0001-Enable-warning-Wreturn-type-by-default.patch I don't think most of the testsuite changes in this patch should be needed, and we should be conservative about changing

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-08-15 Thread Sylvestre Ledru
On 14/08/2014 20:48, Manuel López-Ibáñez wrote: --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -693,6 +693,10 @@ gfc_handle_option (size_t scode, const char *arg, int value, gfc_option.warn_line_truncation = value; break; +case OPT_Wmissing_return: +

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-08-14 Thread Sylvestre Ledru
On 12/08/2014 19:48, Joseph S. Myers wrote: On Mon, 11 Aug 2014, Sylvestre Ledru wrote: The test Wmissing-return2.c only has one of the two warnings. But as per -Wreturn-type = Run both, and for backwards compatibility with the existing definition of -Wreturn-type, both warnings should

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-08-14 Thread Manuel López-Ibáñez
--- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -693,6 +693,10 @@ gfc_handle_option (size_t scode, const char *arg, int value, gfc_option.warn_line_truncation = value; break; +case OPT_Wmissing_return: + warn_missing_return = value; + break; + case

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-08-12 Thread Joseph S. Myers
On Mon, 11 Aug 2014, Sylvestre Ledru wrote: The test Wmissing-return2.c only has one of the two warnings. But as per -Wreturn-type = Run both, and for backwards compatibility with the existing definition of -Wreturn-type, both warnings should appear for this test. Make sense.

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-08-12 Thread Sylvestre Ledru
On 12/08/2014 19:48, Joseph S. Myers wrote: On Mon, 11 Aug 2014, Sylvestre Ledru wrote: The test Wmissing-return2.c only has one of the two warnings. But as per -Wreturn-type = Run both, and for backwards compatibility with the existing definition of -Wreturn-type, both warnings should

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-08-11 Thread Sylvestre Ledru
On 31/07/2014 00:08, Joseph S. Myers wrote: On Mon, 7 Jul 2014, Sylvestre Ledru wrote: Hello, On 17/06/2014 19:41, Joseph S. Myers wrote: On Tue, 17 Jun 2014, Sylvestre Ledru wrote: OK. I will do that. We should test the following: * default = run just -Wreturn-type * -Wreturn-type =

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-07-30 Thread Joseph S. Myers
On Mon, 7 Jul 2014, Sylvestre Ledru wrote: Hello, On 17/06/2014 19:41, Joseph S. Myers wrote: On Tue, 17 Jun 2014, Sylvestre Ledru wrote: OK. I will do that. We should test the following: * default = run just -Wreturn-type * -Wreturn-type = Run both * -Wreturn-type +

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-07-20 Thread Sylvestre Ledru
Joseph, ping :) (I know you were in holidays) S On 07/07/2014 19:17, Sylvestre Ledru wrote: Hello, On 17/06/2014 19:41, Joseph S. Myers wrote: On Tue, 17 Jun 2014, Sylvestre Ledru wrote: OK. I will do that. We should test the following: * default = run just -Wreturn-type *

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-07-07 Thread Sylvestre Ledru
Hello, On 17/06/2014 19:41, Joseph S. Myers wrote: On Tue, 17 Jun 2014, Sylvestre Ledru wrote: OK. I will do that. We should test the following: * default = run just -Wreturn-type * -Wreturn-type = Run both * -Wreturn-type + -Wmissing-return = Run both * -Wno-return-type +

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-06-17 Thread Sylvestre Ledru
On 05/06/2014 20:01, Joseph S. Myers wrote: Initially, I implemented -Wmissing-return to manage this case ( https://gcc.gnu.org/ml/gcc-patches/2014-01/msg00820.html ) but Jason suggested to remove that: https://gcc.gnu.org/ml/gcc-patches/2014-01/msg01033.html (I don't have a strong opinion

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-06-17 Thread Joseph S. Myers
On Tue, 17 Jun 2014, Sylvestre Ledru wrote: On 05/06/2014 20:01, Joseph S. Myers wrote: Initially, I implemented -Wmissing-return to manage this case ( https://gcc.gnu.org/ml/gcc-patches/2014-01/msg00820.html ) but Jason suggested to remove that:

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-06-17 Thread Sylvestre Ledru
On 17/06/2014 19:15, Joseph S. Myers wrote: On Tue, 17 Jun 2014, Sylvestre Ledru wrote: On 05/06/2014 20:01, Joseph S. Myers wrote: Initially, I implemented -Wmissing-return to manage this case ( https://gcc.gnu.org/ml/gcc-patches/2014-01/msg00820.html ) but Jason suggested to remove that:

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-06-17 Thread Joseph S. Myers
On Tue, 17 Jun 2014, Sylvestre Ledru wrote: OK. I will do that. We should test the following: * default = run just -Wreturn-type * -Wreturn-type = Run both * -Wreturn-type + -Wmissing-return = Run both * -Wno-return-type + -Wmissing-return = Run just the second one * -Wno-return-type +

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-06-05 Thread Sylvestre Ledru
On 05/06/2014 01:31, Joseph S. Myers wrote: On Wed, 4 Jun 2014, Sylvestre Ledru wrote: Hello, Finally, I have been able to update all tests with -Wreturn-type enabled by default. AFAIK, under GNU/Linux Debian Jessie 64 bits, there is no PASS-FAIL tests. Now, I would like to know if I can

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-06-05 Thread Joseph S. Myers
On Thu, 5 Jun 2014, Sylvestre Ledru wrote: Some of those patches appear to be addressing cases where control appears to reach the end of a function returning non-void, as opposed to cases where the return type defaults to int. Do you have an example of the patches you are talking about?

[Patch] PR55189 enable -Wreturn-type by default

2014-06-04 Thread Sylvestre Ledru
Hello, Finally, I have been able to update all tests with -Wreturn-type enabled by default. AFAIK, under GNU/Linux Debian Jessie 64 bits, there is no PASS-FAIL tests. Now, I would like to know if I can commit that into the repository. Who can review that? As attachment, you will find the actual

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-06-04 Thread Mike Stump
On Jun 4, 2014, at 12:49 PM, Sylvestre Ledru sylves...@debian.org wrote: Finally, I have been able to update all tests with -Wreturn-type enabled by default. Now, I would like to know if I can commit that into the repository. Who can review that? I’d like a C style person to review

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-06-04 Thread Joseph S. Myers
On Wed, 4 Jun 2014, Sylvestre Ledru wrote: Hello, Finally, I have been able to update all tests with -Wreturn-type enabled by default. AFAIK, under GNU/Linux Debian Jessie 64 bits, there is no PASS-FAIL tests. Now, I would like to know if I can commit that into the repository. Who can

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-01-23 Thread Jason Merrill
On 01/16/2014 02:44 PM, Jason Merrill wrote: To avoid spurious warnings on code with infinite loops we could add a simple check for infinite loops and suppress the warning in that case. Basically, if we see a loop with an always-true condition and no breaks. Like so: Tested

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-01-23 Thread Sylvestre Ledru
On 23/01/2014 10:48, Jason Merrill wrote: On 01/16/2014 02:44 PM, Jason Merrill wrote: To avoid spurious warnings on code with infinite loops we could add a simple check for infinite loops and suppress the warning in that case. Basically, if we see a loop with an always-true condition and no

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-01-22 Thread Sylvestre Ledru
On 16/01/2014 11:44, Jason Merrill wrote: My preference would be to turn -Wreturn-type on by default, but not create the separate -Wmissing-return flag. As I argued in 2002, there should only be one flag. I don't have any opinion on the subject. The separate option or not is fine with me. I am

Re: [Patch] PR55189 enable -Wreturn-type by default

2014-01-16 Thread Jason Merrill
My preference would be to turn -Wreturn-type on by default, but not create the separate -Wmissing-return flag. As I argued in 2002, there should only be one flag. To avoid spurious warnings on code with infinite loops we could add a simple check for infinite loops and suppress the warning in

Re: [Patch] PR55189 enable -Wreturn-type by default

2013-12-26 Thread Chung-Ju Wu
2013/12/21 Sylvestre Ledru sylves...@debian.org: Hello Following this thread http://gcc.gnu.org/ml/gcc/2013-11/msg00260.html and this bug, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55189 I would like to propose the two following patches: I am activating -Wreturn-type by defaut and add

Re: [Patch] PR55189 enable -Wreturn-type by default

2013-12-26 Thread Yury Gribov
Chung-Wu wrote: But I notice your ChangeLog formatting is not correct. You can refer to other entries in ChangeLog to refine yours, and then resubmit the patch for review. :) Or - use contrib/mklog to autogenerate template ChangeLog for you. -Y