From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90032 invoked by alias); 29 Jul 2015 10:30:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 90014 invoked by uid 48); 29 Jul 2015 10:30:43 -0000 From: "anders.granlund.0 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67047] GCC accepts ill-formed program with enumerator not representable in uintmax_t Date: Wed, 29 Jul 2015 10:30: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: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: anders.granlund.0 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg02523.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67047 --- Comment #5 from Anders Granlund --- (In reply to Jonathan Wakely from comment #4) > Yes you can verify that with > > static_assert( std::is_same::type, > unsigned __int128>::value, ""); > > I suppose there should be a diagnostic with -Wpedantic (Clang has a > -Wenum-too-large warning). Nice use of type traits there for the confirmation. Yes, a -Wpedantic warning is what we want here. I haven't tried this with the c compiler (the online compiler i'm using does not support c mode), but this bug may exists there also.