[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#860263: marked as done (gcc-7: False -Wimplicit-fallthrough when case has braces)



Your message dated Wed, 28 Jun 2017 13:13:25 +0200
with message-id <cd772d41-cea5-eb6b-977a-fe122a48d332@debian.org>
and subject line Re: Bug#860263: gcc-7: False -Wimplicit-fallthrough when case has braces
has caused the Debian Bug report #860263,
regarding gcc-7: False -Wimplicit-fallthrough when case has braces
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
860263: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860263
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: gcc-7
Version: 7-20170407-1
Severity: normal

$ gcc-7 -Wextra -o foo foo.c
foo.c: In function 'main':
foo.c:6:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
    argc = 0;
    ~~~~~^~~~
foo.c:9:3: note: here
   default:
   ^~~~~~~
$ cat foo.c
int main(int argc, char **argv)
{
    switch (argc)
    {
        case 1: {
            argc = 0;
            //fallthrough
        }
        default:
            argc = 1;
            break;
    }

    return 0;
}

Removing the braces for "case 1:" removes the warning.

-- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

--- End Message ---
--- Begin Message ---
closed as invalid upstream, see the upstream report.

On 27.06.2017 14:42, Matthias Klose wrote:
> Control: forwarded -1 https://gcc.gnu.org/PR81230
> Control: tags -1 + upstream

--- End Message ---

Reply to: