public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected
@ 2007-01-15 20:59 Manuel López-Ibáñez
  2007-01-15 21:00 ` Manuel López-Ibáñez
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Manuel López-Ibáñez @ 2007-01-15 20:59 UTC (permalink / raw)
  To: gcc-patches

:ADDPATCH fortran:

Wno-all is currently rejected on mainline. This simple patch fixes the
issue. However, a better fix would be to move Wall to common.opt but
let it be handled by each front-end. I was not able to implement this,
front-ends were not able to catch Wall, any suggestions ?

This patch bootstraps and does not generate new regressions. OK for mainline?

2007-01-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
   fortran/
  PR fortran/30437
  * lang.opt (Wall): Remove RejectNegative.

   testsuite/
  PR fortran/30437
  * gcc.dg/Wall-no.c: New.

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

* Re: PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected
  2007-01-15 20:59 PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected Manuel López-Ibáñez
@ 2007-01-15 21:00 ` Manuel López-Ibáñez
  2007-01-15 21:03 ` Andrew Pinski
  2007-01-15 23:03 ` Brooks Moses
  2 siblings, 0 replies; 7+ messages in thread
From: Manuel López-Ibáñez @ 2007-01-15 21:00 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

Yes, I know, the patch...

On 15/01/07, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> :ADDPATCH fortran:
>
> Wno-all is currently rejected on mainline. This simple patch fixes the
> issue. However, a better fix would be to move Wall to common.opt but
> let it be handled by each front-end. I was not able to implement this,
> front-ends were not able to catch Wall, any suggestions ?
>
> This patch bootstraps and does not generate new regressions. OK for mainline?
>
> 2007-01-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
>    fortran/
>   PR fortran/30437
>   * lang.opt (Wall): Remove RejectNegative.
>
>    testsuite/
>   PR fortran/30437
>   * gcc.dg/Wall-no.c: New.
>

[-- Attachment #2: wno-all.diff --]
[-- Type: text/plain, Size: 660 bytes --]

Index: gcc/testsuite/gcc.dg/Wall-no.c
===================================================================
--- gcc/testsuite/gcc.dg/Wall-no.c	(revision 0)
+++ gcc/testsuite/gcc.dg/Wall-no.c	(revision 0)
@@ -0,0 +1,4 @@
+/* PR 30437: Test negative of -Wall */
+/* { dg-do compile } */
+/* { dg-options "-Wno-all" } */
+int i = 0;
Index: gcc/fortran/lang.opt
===================================================================
--- gcc/fortran/lang.opt	(revision 120588)
+++ gcc/fortran/lang.opt	(working copy)
@@ -34,7 +34,7 @@ Fortran Joined
 -J<directory>	Put MODULE files in 'directory'
 
 Wall
-Fortran RejectNegative
+Fortran
 ; Documented in C
 
 Waliasing

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

* Re: PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected
  2007-01-15 20:59 PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected Manuel López-Ibáñez
  2007-01-15 21:00 ` Manuel López-Ibáñez
@ 2007-01-15 21:03 ` Andrew Pinski
  2007-01-15 21:11   ` Manuel López-Ibáñez
  2007-01-15 23:03 ` Brooks Moses
  2 siblings, 1 reply; 7+ messages in thread
From: Andrew Pinski @ 2007-01-15 21:03 UTC (permalink / raw)
  To: Manuel López-Ibáñez; +Cc: gcc-patches

On Mon, 2007-01-15 at 20:59 +0000, Manuel López-Ibáñez wrote:
> :ADDPATCH fortran:
> 
> Wno-all is currently rejected on mainline. This simple patch fixes the
> issue. However, a better fix would be to move Wall to common.opt but
> let it be handled by each front-end. I was not able to implement this,
> front-ends were not able to catch Wall, any suggestions ?

This is not enough for the Fortran front-end.  You also need to edit
fortran/options.c and the function set_Wall for the now allowing of
-Wno-all.

Thanks,
Andrew Pinski

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

* Re: PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected
  2007-01-15 21:03 ` Andrew Pinski
@ 2007-01-15 21:11   ` Manuel López-Ibáñez
  2007-01-15 21:16     ` Andrew Pinski
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel López-Ibáñez @ 2007-01-15 21:11 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-patches

On 15/01/07, Andrew Pinski <pinskia@gmail.com> wrote:
> On Mon, 2007-01-15 at 20:59 +0000, Manuel López-Ibáñez wrote:
> > :ADDPATCH fortran:
> >
> > Wno-all is currently rejected on mainline. This simple patch fixes the
> > issue. However, a better fix would be to move Wall to common.opt but
> > let it be handled by each front-end. I was not able to implement this,
> > front-ends were not able to catch Wall, any suggestions ?
>
> This is not enough for the Fortran front-end.  You also need to edit
> fortran/options.c and the function set_Wall for the now allowing of
> -Wno-all.

Huh? Is that not handled automatically like options in the C/C++ front-end ?

Really?

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

* Re: PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected
  2007-01-15 21:11   ` Manuel López-Ibáñez
@ 2007-01-15 21:16     ` Andrew Pinski
  2007-01-15 21:25       ` Manuel López-Ibáñez
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Pinski @ 2007-01-15 21:16 UTC (permalink / raw)
  To: Manuel López-Ibáñez; +Cc: gcc-patches

On Mon, 2007-01-15 at 21:11 +0000, Manuel López-Ibáñez wrote:
> 
> Huh? Is that not handled automatically like options in the C/C++
> front-end ?

-Wall is not handled automatically even in the C/C++ front-end:
    case OPT_Wall:
      set_Wunused (value);
      set_Wformat (value);
      set_Wimplicit (value);
      warn_char_subscripts = value;
      warn_missing_braces = value;
      warn_parentheses = value;
      warn_return_type = value;
etc.

What you need to do is add an argument to set_Wall and change that
function.  If you are not willing to do it, I can do it soon after I
finish up my libobjc patch which I am working on.

-- Pinski

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

* Re: PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected
  2007-01-15 21:16     ` Andrew Pinski
@ 2007-01-15 21:25       ` Manuel López-Ibáñez
  0 siblings, 0 replies; 7+ messages in thread
From: Manuel López-Ibáñez @ 2007-01-15 21:25 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-patches

OK. I will do it.

Thanks for the explanation.

Manuel

On 15/01/07, Andrew Pinski <pinskia@gmail.com> wrote:
> On Mon, 2007-01-15 at 21:11 +0000, Manuel López-Ibáñez wrote:
> >
> > Huh? Is that not handled automatically like options in the C/C++
> > front-end ?
>
> -Wall is not handled automatically even in the C/C++ front-end:
>     case OPT_Wall:
>       set_Wunused (value);
>       set_Wformat (value);
>       set_Wimplicit (value);
>       warn_char_subscripts = value;
>       warn_missing_braces = value;
>       warn_parentheses = value;
>       warn_return_type = value;
> etc.
>
> What you need to do is add an argument to set_Wall and change that
> function.  If you are not willing to do it, I can do it soon after I
> finish up my libobjc patch which I am working on.
>
> -- Pinski
>
>

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

* Re: PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected
  2007-01-15 20:59 PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected Manuel López-Ibáñez
  2007-01-15 21:00 ` Manuel López-Ibáñez
  2007-01-15 21:03 ` Andrew Pinski
@ 2007-01-15 23:03 ` Brooks Moses
  2 siblings, 0 replies; 7+ messages in thread
From: Brooks Moses @ 2007-01-15 23:03 UTC (permalink / raw)
  To: gcc-patches

Manuel López-Ibáñez wrote:
> Wno-all is currently rejected on mainline. This simple patch fixes the
> issue. However, a better fix would be to move Wall to common.opt but
> let it be handled by each front-end. I was not able to implement this,
> front-ends were not able to catch Wall, any suggestions ?
> 
> This patch bootstraps and does not generate new regressions. OK for mainline?
> 
> 2007-01-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
>    fortran/
>   PR fortran/30437
>   * lang.opt (Wall): Remove RejectNegative.
> 
>    testsuite/
>   PR fortran/30437
>   * gcc.dg/Wall-no.c: New.

Note that Fortran patches should be crossposted to fortran@gcc.gnu.org 
as well as to the gcc-patches@ list.

(Not only is this standard policy, but my impression is that many of the 
Fortran maintainers don't follow the main patches list, and they're even 
less likely to follow it closely enough to note patches that don't have 
"[Fortran]" in the subject line.)

Incidentally, I would also suggest that your testcase should be one that 
actually tests the implementation of the flag -- that is, it should have 
code that will generate a warning under normal circumstances, but not 
with -Wno-all.

- Brooks

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

end of thread, other threads:[~2007-01-15 23:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-15 20:59 PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected Manuel López-Ibáñez
2007-01-15 21:00 ` Manuel López-Ibáñez
2007-01-15 21:03 ` Andrew Pinski
2007-01-15 21:11   ` Manuel López-Ibáñez
2007-01-15 21:16     ` Andrew Pinski
2007-01-15 21:25       ` Manuel López-Ibáñez
2007-01-15 23:03 ` Brooks Moses

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).