public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
Date: Sat, 15 Jun 2013 09:36:00 -0000	[thread overview]
Message-ID: <bug-52347-4-Af9QBGA7w7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52347-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52347

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Simon Richter from comment #4)
> Testcase is simple:
> 
> $ cat tt.cpp
> 
> void bar(int baz) { }
> 
> $ g++-4.7 -c -W -Wall -Werror -Wno-unused tt.cpp 
> 
> $ g++-4.8 -c -W -Wall -Werror -Wno-unused tt.cpp 
> tt.cpp:1:6: error: unused parameter ‘baz’ [-Werror=unused-parameter]
>  void bar(int baz) { }
>       ^
> cc1plus: all warnings being treated as errors

There is a bug in the logic of the autogenerated code:

      if (!opts_set->x_warn_unused_parameter && (opts->x_warn_unused &&
opts->x_extra_warnings))
          handle_generated_option (opts, opts_set,
                                   OPT_Wunused_parameter, NULL, value,
                                   lang_mask, kind, loc, handlers, dc);

When processing -Wno-unused, opts->x_warn_unused is false, so we don't turn off
OPT_Wunused_parameter. I think the generated code should be:


      if (!opts_set->x_warn_unused_parameter && opts->x_extra_warnings)

for case OPT_Wunused and


      if (!opts_set->x_warn_unused_parameter && opts->x_warn_unused)

for the case OPT_Wextra. So optc-gen.awk needs adjusting. Let me see if I can
find time to do this in the coming weeks/months, but if anyone wants to
investigate how to fix it, please go ahead.

I think this is a different bug than the -Wno-tabs, since that is not handled
by the autogenerated code.
>From gcc-bugs-return-424399-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jun 15 09:36:25 2013
Return-Path: <gcc-bugs-return-424399-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19836 invoked by alias); 15 Jun 2013 09:36:25 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 19792 invoked by uid 48); 15 Jun 2013 09:36:22 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57622] New: -W -Wall -Werror -Wno-unused gives Wunused-parameter warning
Date: Sat, 15 Jun 2013 09:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc dependson
Message-ID: <bug-57622-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg00778.txt.bz2
Content-length: 1974

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57622

            Bug ID: 57622
           Summary: -W -Wall -Werror -Wno-unused gives Wunused-parameter
                    warning
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manu at gcc dot gnu.org
                CC: burnus at gcc dot gnu.org, manu at gcc dot gnu.org,
                    Simon.Richter at hogyros dot de
        Depends on: 52347

+++ This bug was initially created as a clone of Bug #52347 +++

Testcase is simple:

$ cat tt.cpp

void bar(int baz) { }

$ g++-4.7 -c -W -Wall -Werror -Wno-unused tt.cpp 

$ g++-4.8 -c -W -Wall -Werror -Wno-unused tt.cpp 
tt.cpp:1:6: error: unused parameter ‘baz’ [-Werror=unused-parameter]
 void bar(int baz) { }
      ^
cc1plus: all warnings being treated as errors

There is a bug in the logic of the autogenerated code:

      if (!opts_set->x_warn_unused_parameter && (opts->x_warn_unused &&
opts->x_extra_warnings))
          handle_generated_option (opts, opts_set,
                                   OPT_Wunused_parameter, NULL, value,
                                   lang_mask, kind, loc, handlers, dc);

When processing -Wno-unused, opts->x_warn_unused is false, so we don't turn off
OPT_Wunused_parameter. I think the generated code should be:


      if (!opts_set->x_warn_unused_parameter && opts->x_extra_warnings)

for case OPT_Wunused and


      if (!opts_set->x_warn_unused_parameter && opts->x_warn_unused)

for the case OPT_Wextra. So optc-gen.awk needs adjusting. Let me see if I can
find time to do this in the coming weeks/months, but if anyone wants to
investigate how to fix it, please go ahead.

I think this is a different bug than the -Wno-tabs, since that is not handled
by the autogenerated code.
>From gcc-bugs-return-424400-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jun 15 09:36:47 2013
Return-Path: <gcc-bugs-return-424400-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20523 invoked by alias); 15 Jun 2013 09:36:47 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 20489 invoked by uid 48); 15 Jun 2013 09:36:44 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57622] -W -Wall -Werror -Wno-unused gives Wunused-parameter warning
Date: Sat, 15 Jun 2013 09:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed
Message-ID: <bug-57622-4-t68PFRdMVt@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57622-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57622-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg00779.txt.bz2
Content-length: 477

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57622

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-06-15
                 CC|burnus at gcc dot gnu.org          |
     Ever confirmed|0                           |1
>From gcc-bugs-return-424401-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jun 15 09:39:15 2013
Return-Path: <gcc-bugs-return-424401-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22918 invoked by alias); 15 Jun 2013 09:39:15 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22883 invoked by uid 48); 15 Jun 2013 09:39:12 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
Date: Sat, 15 Jun 2013 09:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.7.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc blocked
Message-ID: <bug-52347-4-i1geEaUCut@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-52347-4@http.gcc.gnu.org/bugzilla/>
References: <bug-52347-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg00780.txt.bz2
Content-length: 640

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52347

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|manu at gcc dot gnu.org            |
             Blocks|57622                       |

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I created bug 52347 to track the autogenerated code issue. This bug should be
fixed if Fortran's -Wall is moved to the autogenerated method of handling group
options (see options.texi)
>From gcc-bugs-return-424402-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jun 15 09:54:04 2013
Return-Path: <gcc-bugs-return-424402-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26910 invoked by alias); 15 Jun 2013 09:54:04 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 26858 invoked by uid 48); 15 Jun 2013 09:53:54 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57620] Phantom terminator confuses raw string literal parsing.
Date: Sat, 15 Jun 2013 09:54:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57620-4-Ug94S2Mep4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57620-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57620-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg00781.txt.bz2
Content-length: 497

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW620

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
There seems to be more issues in the raw string literal lexing.  E.g.
const char *s = R"a??/(x)a??/";
should be I think handled the same as
const char *s = "x";
with -std=c++11 or -std=gnu++11 -trigraphs, but is not.  We only revert the
phase 1 and phase 2 transformations in between ( and ), but they should
actually be reverted everywhere between the " after R and the final ".


  parent reply	other threads:[~2013-06-15  9:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23  8:37 [Bug fortran/52347] New: " burnus at gcc dot gnu.org
2012-02-23  8:42 ` [Bug fortran/52347] " manu at gcc dot gnu.org
2013-06-14 19:43 ` Simon.Richter at hogyros dot de
2013-06-14 21:27 ` manu at gcc dot gnu.org
2013-06-14 23:15 ` Simon.Richter at hogyros dot de
2013-06-15  9:36 ` manu at gcc dot gnu.org [this message]
2014-12-11 17:41 ` burnus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-52347-4-Af9QBGA7w7@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).