public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/46073] New: __builtin_choose_expr outputs warnings for unused expression
@ 2010-10-18 18:57 kevin.waugh at gmail dot com
  2010-10-18 19:01 ` [Bug c/46073] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kevin.waugh at gmail dot com @ 2010-10-18 18:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46073

           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=c99 -Wall -x c - << EOF
void A(int * p) {}
void B(double * p) {}
int main() {
  int * p = 0;
  __builtin_choose_expr(__builtin_types_compatible_p(__typeof__(p), int *),
A(p), B(p));
  return 0;
}
EOF
<stdin>: In function ‘main’:
<stdin>:5: warning: passing argument 1 of ‘B’ from incompatible 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=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5493)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-18 19:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-18 18:57 [Bug c/46073] New: __builtin_choose_expr outputs warnings for unused expression kevin.waugh at gmail dot com
2010-10-18 19:01 ` [Bug c/46073] " pinskia at gcc dot gnu.org
2010-10-18 19:17 ` kevin.waugh at gmail dot com
2010-10-18 19:55 ` joseph at codesourcery dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).