From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12783 invoked by alias); 18 Oct 2010 18:57:15 -0000 Received: (qmail 12775 invoked by uid 22791); 18 Oct 2010 18:57:14 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GX X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Oct 2010 18:57:09 +0000 From: "kevin.waugh at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/46073] New: __builtin_choose_expr outputs warnings for unused expression X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: kevin.waugh at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Mon, 18 Oct 2010 18:57:00 -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 X-SW-Source: 2010-10/txt/msg01514.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D46073 Summary: __builtin_choose_expr outputs warnings for unused expression Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: kevin.waugh@gmail.com $ gcc -std=3Dc99 -Wall -x c - << EOF void A(int * p) {} void B(double * p) {} int main() { int * p =3D 0; __builtin_choose_expr(__builtin_types_compatible_p(__typeof__(p), int *), A(p), B(p)); return 0; } EOF : In function =E2=80=98main=E2=80=99: :5: warning: passing argument 1 of =E2=80=98B=E2=80=99 from incompat= ible pointer type $ gcc -v Using built-in specs. Target: i686-apple-darwin9 Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking -enable-werror --prefix=3D/usr --mandir=3D/share/man --enable-languages=3Dc,objc,c++,obj-c++ --program-transform-name=3D/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=3D/include/c++/4.0.0 --with-slibdir=3D/usr/lib --build=3Di686-apple-darwin9 --with-arch=3Dapple --with-tune=3Dgeneric --host=3Di686-apple-darwin9 --target=3Di686-apple-darwin9 Thread model: posix gcc version 4.0.1 (Apple Inc. build 5493)