From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ADC53385AC39; Tue, 28 Feb 2023 12:37:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADC53385AC39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677587878; bh=eiKtg268W45XOLejmibmDu7wxcRwEPHEe0eFjCO5qmw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=X7tK22VZSzLIVHSPsYUy0F7cIiIVVgiUa9Tq0POv57ri1uyFm13PN/hSscXlSohPI Ft9XRJS7mBfvDVUkI2Qm41KPY493/3QBIVX/YiK56blwQtm7lfzrgF5U0uKC8hZcxT /eGuXbnvuiXbE4BWa+0dvimwMJcc1suxdAaFXUqM= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108965] g++: unable to parse c11 _Generics Date: Tue, 28 Feb 2023 12:37:57 +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.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108965 --- Comment #7 from Jonathan Wakely --- (In reply to Christopher Friedt from comment #6) > It's supported OOTB in `clang++` but fails in `g++`. Nobody is disputing that, but Clang supports lots of things that aren't val= id in C++ and aren't supported by G++, and G++ supports things that aren't val= id in C++ and aren't supported by Clang. That's not a bug. > The example above is the simplest example that illustrates the issue. Yes, and it's not valid C++. > I am not being abusive, but it certainly did feel like gaslighting to read > "you're doing it wrong" / close invalid without any consideration. I commented explaining that it's not in the C++ standard, and followed up in the github issue where the real bug is. That's hardly "without consideratio= n". I've shown how to fix your C++ code to make it valid in C++11, and pointed = out a problem in your C code using _Generic. I didn't have to do any of that, a= nd I certainly won't bother doing so again.=