From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B24D2385F02C; Wed, 14 Jul 2021 09:42:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B24D2385F02C From: "ismail at i10z dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/101446] -Wpedantic causes an error with zero size array Date: Wed, 14 Jul 2021 09:42:10 +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: 11.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ismail at i10z dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: In-Reply-To: References: 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-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2021 09:42:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101446 --- Comment #3 from =C4=B0smail D=C3=B6nmez --- (In reply to Richard Biener from comment #2) > -Wpedantic is the same as -pedantic and that affects correctness of progr= ams. >=20 > @item -Wpedantic > @itemx -pedantic > @opindex pedantic > @opindex Wpedantic > @opindex Wno-pedantic > Issue all the warnings demanded by strict ISO C and ISO C++; > reject all programs that use forbidden extensions, and some other > programs that do not follow ISO C and ISO C++. For ISO C, follows the > version of the ISO C standard specified by any @option{-std} option used. >=20 > Valid ISO C and ISO C++ programs should compile properly with or without > this option (though a rare few require @option{-ansi} or a > @option{-std} option specifying the required version of ISO C)@. However, > without this option, certain GNU extensions and traditional C and C++ > features are supported as well. With this option, they are rejected. Well, not quite so. I enabled -Wpedantic with glibc and have hundreds of warnings and only the zero-size array one errors out. There is clearly an inconsistency here.=