http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50720
Bug #: 50720 Summary: "deprecated" doesn't work as expected for functions returning pointer Classification: Unclassified Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: bhelg...@google.com I expected warnings on each of the four function calls below, but I only got three warnings (the one for "old_fn1a" is missing). $ cat x.c struct foo { int bar; }; struct foo * __attribute__ ((deprecated)) old_fn1a(); struct foo * old_fn1b() __attribute__ ((deprecated)); int __attribute__ ((deprecated)) old_fn2a(); int old_fn2b() __attribute__ ((deprecated)); void test(void) { old_fn1a(); old_fn1b(); old_fn2a(); old_fn2b(); } $ cc -c x.c x.c: In function ‘test’: x.c:12: warning: ‘old_fn1b’ is deprecated (declared at x.c:4) x.c:13: warning: ‘old_fn2a’ is deprecated (declared at x.c:6) x.c:14: warning: ‘old_fn2b’ is deprecated (declared at x.c:7) $ cc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)