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: [email protected]
ReportedBy: [email protected]
$ 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)