public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Fix warnings reported with -Wreturn-type after patching PR c/48116.
@ 2016-06-01 11:55 Marcin Baczyński
  2016-06-01 11:55 ` [PATCH] Warn about return with a void expression with -Wreturn-type Marcin Baczyński
  0 siblings, 1 reply; 12+ messages in thread
From: Marcin Baczyński @ 2016-06-01 11:55 UTC (permalink / raw)
  To: gcc-patches; +Cc: Marcin Baczyński

libgomp/ChangeLog:

   * fortran.c (omp_set_default_device_, omp_set_default_device_8):
    don't put a void expression in a return,
   * oacc-mem.c (acc_free): likewise,
   * target.c (GOMP_target, GOMP_target_data, GOMP_target_data_ext):
    likewise.
---
 libgomp/fortran.c  |  4 ++--
 libgomp/oacc-mem.c |  5 ++++-
 libgomp/target.c   | 15 ++++++++++++---
 3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/libgomp/fortran.c b/libgomp/fortran.c
index 6b1ef37..1eb9340 100644
--- a/libgomp/fortran.c
+++ b/libgomp/fortran.c
@@ -526,13 +526,13 @@ omp_get_partition_place_nums_8_ (int64_t *place_nums)
 void
 omp_set_default_device_ (const int32_t *device_num)
 {
-  return omp_set_default_device (*device_num);
+  omp_set_default_device (*device_num);
 }
 
 void
 omp_set_default_device_8_ (const int64_t *device_num)
 {
-  return omp_set_default_device (TO_INT (*device_num));
+  omp_set_default_device (TO_INT (*device_num));
 }
 
 int32_t
diff --git a/libgomp/oacc-mem.c b/libgomp/oacc-mem.c
index bd4b62b..87f9435 100644
--- a/libgomp/oacc-mem.c
+++ b/libgomp/oacc-mem.c
@@ -129,7 +129,10 @@ acc_free (void *d)
   struct gomp_device_descr *acc_dev = thr->dev;
 
   if (acc_dev->capabilities & GOMP_OFFLOAD_CAP_SHARED_MEM)
-    return free (d);
+    {
+      free (d);
+      return;
+    }
 
   gomp_mutex_lock (&acc_dev->lock);
 
diff --git a/libgomp/target.c b/libgomp/target.c
index 48b9ab8..bf2fa5f 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -1426,7 +1426,10 @@ GOMP_target (int device, void (*fn) (void *), const void *unused,
       /* All shared memory devices should use the GOMP_target_ext function.  */
       || devicep->capabilities & GOMP_OFFLOAD_CAP_SHARED_MEM
       || !(fn_addr = gomp_get_target_fn_addr (devicep, fn)))
-    return gomp_target_fallback (fn, hostaddrs);
+    {
+      gomp_target_fallback (fn, hostaddrs);
+      return;
+    }
 
   struct target_mem_desc *tgt_vars
     = gomp_map_vars (devicep, mapnum, hostaddrs, NULL, sizes, kinds, false,
@@ -1609,7 +1612,10 @@ GOMP_target_data (int device, const void *unused, size_t mapnum,
   if (devicep == NULL
       || !(devicep->capabilities & GOMP_OFFLOAD_CAP_OPENMP_400)
       || (devicep->capabilities & GOMP_OFFLOAD_CAP_SHARED_MEM))
-    return gomp_target_data_fallback ();
+    {
+      gomp_target_data_fallback ();
+      return;
+    }
 
   struct target_mem_desc *tgt
     = gomp_map_vars (devicep, mapnum, hostaddrs, NULL, sizes, kinds, false,
@@ -1628,7 +1634,10 @@ GOMP_target_data_ext (int device, size_t mapnum, void **hostaddrs,
   if (devicep == NULL
       || !(devicep->capabilities & GOMP_OFFLOAD_CAP_OPENMP_400)
       || devicep->capabilities & GOMP_OFFLOAD_CAP_SHARED_MEM)
-    return gomp_target_data_fallback ();
+    {
+      gomp_target_data_fallback ();
+      return;
+    }
 
   struct target_mem_desc *tgt
     = gomp_map_vars (devicep, mapnum, hostaddrs, NULL, sizes, kinds, true,
-- 
2.8.3

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-01 11:55 [PATCH 1/2] Fix warnings reported with -Wreturn-type after patching PR c/48116 Marcin Baczyński
@ 2016-06-01 11:55 ` Marcin Baczyński
  2016-06-01 12:07   ` Jakub Jelinek
  0 siblings, 1 reply; 12+ messages in thread
From: Marcin Baczyński @ 2016-06-01 11:55 UTC (permalink / raw)
  To: gcc-patches; +Cc: Marcin Baczyński

PR c/48116.

Botstrapped and tested on x86_64-pc-linux-gnu.

gcc/ChangeLog:

   * c/c-typeck.c (c_finish_return): emit warning about return with a
    void expression in a function returning void if warn_return_type.

gcc/testsuite/ChangeLog:

   * gcc.dg/Wreturn-type3.c: new test.
---
 gcc/c/c-typeck.c                     | 4 ++++
 gcc/testsuite/gcc.dg/Wreturn-type3.c | 6 ++++++
 2 files changed, 10 insertions(+)
 create mode 100644 gcc/testsuite/gcc.dg/Wreturn-type3.c

diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 1520c20..8ac6cd4 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -9700,6 +9700,10 @@ c_finish_return (location_t loc, tree retval, tree origtype)
 	warned_here = pedwarn
 	  (xloc, 0,
 	   "%<return%> with a value, in function returning void");
+      else if (warn_return_type)
+	warned_here = warning_at
+	  (loc, OPT_Wreturn_type,
+	   "%<return%> with expression, in function returning void");
       else
 	warned_here = pedwarn
 	  (xloc, OPT_Wpedantic, "ISO C forbids "
diff --git a/gcc/testsuite/gcc.dg/Wreturn-type3.c b/gcc/testsuite/gcc.dg/Wreturn-type3.c
new file mode 100644
index 0000000..e83c94b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wreturn-type3.c
@@ -0,0 +1,6 @@
+/* PR c/48116 */
+/* { dg-do compile } */
+/* { dg-options "-Wreturn-type" } */
+
+void a() {}
+void b() { return a(); }  /* { dg-warning "return" "returning void" } */
-- 
2.8.3

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-01 11:55 ` [PATCH] Warn about return with a void expression with -Wreturn-type Marcin Baczyński
@ 2016-06-01 12:07   ` Jakub Jelinek
       [not found]     ` <CALvMQwTZiyrL+KvcFAk20ZYSLk9dDOR+vLJasLhr-C_23WijJA@mail.gmail.com>
  0 siblings, 1 reply; 12+ messages in thread
From: Jakub Jelinek @ 2016-06-01 12:07 UTC (permalink / raw)
  To: Marcin Baczyński; +Cc: gcc-patches

On Wed, Jun 01, 2016 at 01:55:04PM +0200, Marcin Baczyński wrote:
> PR c/48116.
> 
> Botstrapped and tested on x86_64-pc-linux-gnu.
> 
> gcc/ChangeLog:
> 
>    * c/c-typeck.c (c_finish_return): emit warning about return with a
>     void expression in a function returning void if warn_return_type.

This is a GNU extension, so I fail to see why you should warn.  Furthermore,
the way you've done it, you would still warn instead of emit error e.g. with
-pedantic-errors on it.
Also, c/ prefixes don't belong to ChangeLog entries, gcc/c/ChangeLog is
-separate, and after : the first letter should be capitalized.
> 
> gcc/testsuite/ChangeLog:
> 
>    * gcc.dg/Wreturn-type3.c: new test.
> ---
>  gcc/c/c-typeck.c                     | 4 ++++
>  gcc/testsuite/gcc.dg/Wreturn-type3.c | 6 ++++++
>  2 files changed, 10 insertions(+)
>  create mode 100644 gcc/testsuite/gcc.dg/Wreturn-type3.c
> 
> diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
> index 1520c20..8ac6cd4 100644
> --- a/gcc/c/c-typeck.c
> +++ b/gcc/c/c-typeck.c
> @@ -9700,6 +9700,10 @@ c_finish_return (location_t loc, tree retval, tree origtype)
>  	warned_here = pedwarn
>  	  (xloc, 0,
>  	   "%<return%> with a value, in function returning void");
> +      else if (warn_return_type)
> +	warned_here = warning_at
> +	  (loc, OPT_Wreturn_type,
> +	   "%<return%> with expression, in function returning void");
>        else
>  	warned_here = pedwarn
>  	  (xloc, OPT_Wpedantic, "ISO C forbids "
> diff --git a/gcc/testsuite/gcc.dg/Wreturn-type3.c b/gcc/testsuite/gcc.dg/Wreturn-type3.c
> new file mode 100644
> index 0000000..e83c94b
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/Wreturn-type3.c
> @@ -0,0 +1,6 @@
> +/* PR c/48116 */
> +/* { dg-do compile } */
> +/* { dg-options "-Wreturn-type" } */
> +
> +void a() {}
> +void b() { return a(); }  /* { dg-warning "return" "returning void" } */
> -- 
> 2.8.3

	Jakub

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
       [not found]     ` <CALvMQwTZiyrL+KvcFAk20ZYSLk9dDOR+vLJasLhr-C_23WijJA@mail.gmail.com>
@ 2016-06-01 16:39       ` Jakub Jelinek
  2016-06-01 17:03         ` Martin Sebor
  0 siblings, 1 reply; 12+ messages in thread
From: Jakub Jelinek @ 2016-06-01 16:39 UTC (permalink / raw)
  To: Marcin Baczyński; +Cc: gcc-patches

On Wed, Jun 01, 2016 at 02:44:22PM +0200, Marcin Baczyński wrote:
> On 1 Jun 2016 14:07, "Jakub Jelinek" <jakub@redhat.com> wrote:
> >
> > On Wed, Jun 01, 2016 at 01:55:04PM +0200, Marcin Baczyński wrote:
> > > PR c/48116.
> > >
> > > Botstrapped and tested on x86_64-pc-linux-gnu.
> > >
> > > gcc/ChangeLog:
> > >
> > >    * c/c-typeck.c (c_finish_return): emit warning about return with a
> > >     void expression in a function returning void if warn_return_type.
> >
> > This is a GNU extension, so I fail to see why you should warn.
> 
> The bug is on the easyhacks list, I thought it would be a good place to
> start digging into the GCC code base.

First of all, I'm not the C FE maintainer, so these are just IMHO comments,
the maintainers might have different opinion.

> Do you have any suggestions for better things to start with?

Welcome to GCC hacking!  I'm must say I don't know in what state the easy
hacks list is, but for bugs that have been sitting in bugzilla for many
years there often is a reason why they haven't been addressed - it could be
just lack of interest from anybody, or that they fell through without
anybody noticing, but could be also that they aren't all that easy.
Often the easiest to fix bugs could be among the most recently filed PRs.

	Jakub

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-01 16:39       ` Jakub Jelinek
@ 2016-06-01 17:03         ` Martin Sebor
  2016-06-01 18:59           ` Marcin Baczyński
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Sebor @ 2016-06-01 17:03 UTC (permalink / raw)
  To: Marcin Baczyński; +Cc: Jakub Jelinek, gcc-patches

On 06/01/2016 10:39 AM, Jakub Jelinek wrote:
> On Wed, Jun 01, 2016 at 02:44:22PM +0200, Marcin Baczyński wrote:
>> On 1 Jun 2016 14:07, "Jakub Jelinek" <jakub@redhat.com> wrote:
>>>
>>> On Wed, Jun 01, 2016 at 01:55:04PM +0200, Marcin Baczyński wrote:
>>>> PR c/48116.
>>>>
>>>> Botstrapped and tested on x86_64-pc-linux-gnu.
>>>>
>>>> gcc/ChangeLog:
>>>>
>>>>     * c/c-typeck.c (c_finish_return): emit warning about return with a
>>>>      void expression in a function returning void if warn_return_type.
>>>
>>> This is a GNU extension, so I fail to see why you should warn.
>>
>> The bug is on the easyhacks list, I thought it would be a good place to
>> start digging into the GCC code base.
>
> First of all, I'm not the C FE maintainer, so these are just IMHO comments,
> the maintainers might have different opinion.
>
>> Do you have any suggestions for better things to start with?

Since you've done a lot of work on this bug already I think it
would be worthwhile to see it through to completion.  Given that,
as Jakub mentioned, the absence of the warning in permissive mode
(i.e. without -Wpedantic) is a GCC extension to C, it would be
helpful to mention it in the manual (doing so would resolve the
submitter's complaint that the -Wreturn-type option doesn't work
as documented).  With the documentation patch accepted, the bug
can then be closed as resolved/fixed and taken off the easy hacks
list.

Martin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-01 17:03         ` Martin Sebor
@ 2016-06-01 18:59           ` Marcin Baczyński
  2016-06-02  2:51             ` Martin Sebor
  0 siblings, 1 reply; 12+ messages in thread
From: Marcin Baczyński @ 2016-06-01 18:59 UTC (permalink / raw)
  To: Martin Sebor; +Cc: Jakub Jelinek, gcc-patches

2016-06-01 19:03 GMT+02:00 Martin Sebor <msebor@gmail.com>:
>
> On 06/01/2016 10:39 AM, Jakub Jelinek wrote:
>>
>> On Wed, Jun 01, 2016 at 02:44:22PM +0200, Marcin Baczyński wrote:
>>>
>>> On 1 Jun 2016 14:07, "Jakub Jelinek" <jakub@redhat.com> wrote:
>>>>
>>>>
>>>> On Wed, Jun 01, 2016 at 01:55:04PM +0200, Marcin Baczyński wrote:
>>>>>
>>>>> PR c/48116.
>>>>>
>>>>> Botstrapped and tested on x86_64-pc-linux-gnu.
>>>>>
>>>>> gcc/ChangeLog:
>>>>>
>>>>>     * c/c-typeck.c (c_finish_return): emit warning about return with a
>>>>>      void expression in a function returning void if warn_return_type.
>>>>
>>>>
>>>> This is a GNU extension, so I fail to see why you should warn.
>>>
>>>
>>> The bug is on the easyhacks list, I thought it would be a good place to
>>> start digging into the GCC code base.
>>
>>
>> First of all, I'm not the C FE maintainer, so these are just IMHO comments,
>> the maintainers might have different opinion.
>>
>>> Do you have any suggestions for better things to start with?
>
>
> Since you've done a lot of work on this bug already I think it
> would be worthwhile to see it through to completion.  Given that,
> as Jakub mentioned, the absence of the warning in permissive mode
> (i.e. without -Wpedantic) is a GCC extension to C, it would be
> helpful to mention it in the manual (doing so would resolve the
> submitter's complaint that the -Wreturn-type option doesn't work
> as documented).  With the documentation patch accepted, the bug
> can then be closed as resolved/fixed and taken off the easy hacks
> list.
>
>
> Martin


So here's my shot at fixing this in the documentation. Does that look okay?


gcc/ChangeLog:

  PR c/48116.

  * doc/invoke.texi (-Wreturn-type): Mention not warning on return with
   a void expression in a void function.
---
gcc/doc/invoke.texi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ce162a0..72e3f2d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -4055,8 +4055,12 @@ Warn whenever a function is defined with a
return type that defaults
to @code{int}.  Also warn about any @code{return} statement with no
return value in a function whose return type is not @code{void}
(falling off the end of the function body is considered returning
-without a value), and about a @code{return} statement with an
-expression in a function whose return type is @code{void}.
+without a value).
+
+For a @code{return} statement with an expression in a function whose
+return type is @code{void}, warn unless the expression type is also
+@code{void}.  As a GNU extension, the latter case is accepted without a
+warning unless @option{-Wpedantic} is used.

For C++, a function without return type always produces a diagnostic
message, even when @option{-Wno-return-type} is specified.  The only
--
2.8.3

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-01 18:59           ` Marcin Baczyński
@ 2016-06-02  2:51             ` Martin Sebor
  2016-06-02 10:03               ` Marcin Baczyński
  2016-06-02 10:03               ` Marcin Baczyński
  0 siblings, 2 replies; 12+ messages in thread
From: Martin Sebor @ 2016-06-02  2:51 UTC (permalink / raw)
  To: Marcin Baczyński; +Cc: Jakub Jelinek, gcc-patches

> So here's my shot at fixing this in the documentation. Does that look okay?
>

It looks good to me.  Just one minor point below.

> @@ -4055,8 +4055,12 @@ Warn whenever a function is defined with a
> return type that defaults
> to @code{int}.  Also warn about any @code{return} statement with no
> return value in a function whose return type is not @code{void}
> (falling off the end of the function body is considered returning
> -without a value), and about a @code{return} statement with an
> -expression in a function whose return type is @code{void}.
> +without a value).
> +
> +For a @code{return} statement with an expression in a function whose
> +return type is @code{void}, warn unless the expression type is also
> +@code{void}.  As a GNU extension, the latter case is accepted without a
> +warning unless @option{-Wpedantic} is used.

I would suggest to add that this only applies to C.  Otherwise
it's valid C++ so G++ accepts it without a pedantic warning.

As a disclaimer, someone else endowed with those special powers
will need to approve your final patch.  If you don't get a timely
approval please ping the patch weekly.

Martin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-02  2:51             ` Martin Sebor
  2016-06-02 10:03               ` Marcin Baczyński
@ 2016-06-02 10:03               ` Marcin Baczyński
  2016-06-03  9:36                 ` Bernd Schmidt
  1 sibling, 1 reply; 12+ messages in thread
From: Marcin Baczyński @ 2016-06-02 10:03 UTC (permalink / raw)
  To: Martin Sebor; +Cc: Jakub Jelinek, gcc-patches

2016-06-02 4:51 GMT+02:00 Martin Sebor <msebor@gmail.com>:
>> So here's my shot at fixing this in the documentation. Does that look
>> okay?
>>
>
> It looks good to me.  Just one minor point below.
>
>> @@ -4055,8 +4055,12 @@ Warn whenever a function is defined with a
>> return type that defaults
>> to @code{int}.  Also warn about any @code{return} statement with no
>> return value in a function whose return type is not @code{void}
>> (falling off the end of the function body is considered returning
>> -without a value), and about a @code{return} statement with an
>> -expression in a function whose return type is @code{void}.
>> +without a value).
>> +
>> +For a @code{return} statement with an expression in a function whose
>> +return type is @code{void}, warn unless the expression type is also
>> +@code{void}.  As a GNU extension, the latter case is accepted without a
>> +warning unless @option{-Wpedantic} is used.
>
>
> I would suggest to add that this only applies to C.  Otherwise
> it's valid C++ so G++ accepts it without a pedantic warning.

Done.

>
> As a disclaimer, someone else endowed with those special powers
> will need to approve your final patch.  If you don't get a timely
> approval please ping the patch weekly.
>
> Martin
>


gcc/ChangeLog:

  PR c/48116.

  * doc/invoke.texi (-Wreturn-type): Mention not warning on return with
   a void expression in a void function.
---
gcc/doc/invoke.texi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ce162a0..1747d1b 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -4055,8 +4055,12 @@ Warn whenever a function is defined with a
return type that defaults
to @code{int}.  Also warn about any @code{return} statement with no
return value in a function whose return type is not @code{void}
(falling off the end of the function body is considered returning
-without a value), and about a @code{return} statement with an
-expression in a function whose return type is @code{void}.
+without a value).
+
+For C only, warn about a @code{return} statement with an expression in a
+function whose return type is @code{void}, unless the expression type is
+also @code{void}.  As a GNU extension, the latter case is accepted
+without a warning unless @option{-Wpedantic} is used.

For C++, a function without return type always produces a diagnostic
message, even when @option{-Wno-return-type} is specified.  The only
--
2.8.3

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-02  2:51             ` Martin Sebor
@ 2016-06-02 10:03               ` Marcin Baczyński
  2016-06-02 10:03               ` Marcin Baczyński
  1 sibling, 0 replies; 12+ messages in thread
From: Marcin Baczyński @ 2016-06-02 10:03 UTC (permalink / raw)
  To: Martin Sebor; +Cc: Jakub Jelinek, gcc-patches

2016-06-02 4:51 GMT+02:00 Martin Sebor <msebor@gmail.com>:
>> So here's my shot at fixing this in the documentation. Does that look
>> okay?
>>
>
> It looks good to me.  Just one minor point below.
>
>> @@ -4055,8 +4055,12 @@ Warn whenever a function is defined with a
>> return type that defaults
>> to @code{int}.  Also warn about any @code{return} statement with no
>> return value in a function whose return type is not @code{void}
>> (falling off the end of the function body is considered returning
>> -without a value), and about a @code{return} statement with an
>> -expression in a function whose return type is @code{void}.
>> +without a value).
>> +
>> +For a @code{return} statement with an expression in a function whose
>> +return type is @code{void}, warn unless the expression type is also
>> +@code{void}.  As a GNU extension, the latter case is accepted without a
>> +warning unless @option{-Wpedantic} is used.
>
>
> I would suggest to add that this only applies to C.  Otherwise
> it's valid C++ so G++ accepts it without a pedantic warning.

Done.

>
> As a disclaimer, someone else endowed with those special powers
> will need to approve your final patch.  If you don't get a timely
> approval please ping the patch weekly.
>
> Martin
>


gcc/ChangeLog:

  PR c/48116.

  * doc/invoke.texi (-Wreturn-type): Mention not warning on return with
   a void expression in a void function.
---
gcc/doc/invoke.texi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ce162a0..1747d1b 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -4055,8 +4055,12 @@ Warn whenever a function is defined with a
return type that defaults
to @code{int}.  Also warn about any @code{return} statement with no
return value in a function whose return type is not @code{void}
(falling off the end of the function body is considered returning
-without a value), and about a @code{return} statement with an
-expression in a function whose return type is @code{void}.
+without a value).
+
+For C only, warn about a @code{return} statement with an expression in a
+function whose return type is @code{void}, unless the expression type is
+also @code{void}.  As a GNU extension, the latter case is accepted
+without a warning unless @option{-Wpedantic} is used.

For C++, a function without return type always produces a diagnostic
message, even when @option{-Wno-return-type} is specified.  The only
--
2.8.3

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-02 10:03               ` Marcin Baczyński
@ 2016-06-03  9:36                 ` Bernd Schmidt
  2016-06-03 10:16                   ` Marcin Baczyński
  0 siblings, 1 reply; 12+ messages in thread
From: Bernd Schmidt @ 2016-06-03  9:36 UTC (permalink / raw)
  To: Marcin Baczyński, Martin Sebor; +Cc: Jakub Jelinek, gcc-patches

On 06/02/2016 12:03 PM, Marcin Baczyński wrote:
> 2016-06-02 4:51 GMT+02:00 Martin Sebor <msebor@gmail.com>:
>> As a disclaimer, someone else endowed with those special powers
>> will need to approve your final patch.  If you don't get a timely
>> approval please ping the patch weekly.

>    * doc/invoke.texi (-Wreturn-type): Mention not warning on return with
>     a void expression in a void function.

If Martin is happy with this then OK.


Bernd

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-03  9:36                 ` Bernd Schmidt
@ 2016-06-03 10:16                   ` Marcin Baczyński
  2016-06-04 20:51                     ` Martin Sebor
  0 siblings, 1 reply; 12+ messages in thread
From: Marcin Baczyński @ 2016-06-03 10:16 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: Martin Sebor, Jakub Jelinek, gcc-patches

2016-06-03 11:36 GMT+02:00 Bernd Schmidt <bschmidt@redhat.com>:
> On 06/02/2016 12:03 PM, Marcin Baczyński wrote:
>>
>> 2016-06-02 4:51 GMT+02:00 Martin Sebor <msebor@gmail.com>:
>>>
>>> As a disclaimer, someone else endowed with those special powers
>>> will need to approve your final patch.  If you don't get a timely
>>> approval please ping the patch weekly.
>
>
>>    * doc/invoke.texi (-Wreturn-type): Mention not warning on return with
>>     a void expression in a void function.
>
>
> If Martin is happy with this then OK.

Thanks!
Could someone with repository write access commit the patch, please?
>
>
> Bernd
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Warn about return with a void expression with -Wreturn-type.
  2016-06-03 10:16                   ` Marcin Baczyński
@ 2016-06-04 20:51                     ` Martin Sebor
  0 siblings, 0 replies; 12+ messages in thread
From: Martin Sebor @ 2016-06-04 20:51 UTC (permalink / raw)
  To: Marcin Baczyński, Bernd Schmidt; +Cc: Jakub Jelinek, gcc-patches

On 06/03/2016 04:12 AM, Marcin Baczyński wrote:
> 2016-06-03 11:36 GMT+02:00 Bernd Schmidt <bschmidt@redhat.com>:
>> On 06/02/2016 12:03 PM, Marcin Baczyński wrote:
>>>
>>> 2016-06-02 4:51 GMT+02:00 Martin Sebor <msebor@gmail.com>:
>>>>
>>>> As a disclaimer, someone else endowed with those special powers
>>>> will need to approve your final patch.  If you don't get a timely
>>>> approval please ping the patch weekly.
>>
>>
>>>     * doc/invoke.texi (-Wreturn-type): Mention not warning on return with
>>>      a void expression in a void function.
>>
>>
>> If Martin is happy with this then OK.
>
> Thanks!
> Could someone with repository write access commit the patch, please?

I committed it in r237093.

Thanks
Martin

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-06-04 20:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-01 11:55 [PATCH 1/2] Fix warnings reported with -Wreturn-type after patching PR c/48116 Marcin Baczyński
2016-06-01 11:55 ` [PATCH] Warn about return with a void expression with -Wreturn-type Marcin Baczyński
2016-06-01 12:07   ` Jakub Jelinek
     [not found]     ` <CALvMQwTZiyrL+KvcFAk20ZYSLk9dDOR+vLJasLhr-C_23WijJA@mail.gmail.com>
2016-06-01 16:39       ` Jakub Jelinek
2016-06-01 17:03         ` Martin Sebor
2016-06-01 18:59           ` Marcin Baczyński
2016-06-02  2:51             ` Martin Sebor
2016-06-02 10:03               ` Marcin Baczyński
2016-06-02 10:03               ` Marcin Baczyński
2016-06-03  9:36                 ` Bernd Schmidt
2016-06-03 10:16                   ` Marcin Baczyński
2016-06-04 20:51                     ` Martin Sebor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).