------- Comment #1 from iains at gcc dot gnu dot org 2010-04-19 18:38 ------- Created an attachment (id=20422) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20422&action=view) fix PR43797
I think we need to be consistent about adding the attributes and use a null value to determine that the string is empty. This is also likely to be more important if we add multiple states of deprecation (i.e. unavailability). checked on i686-apple-darwin9 and ia32-pc-linux gcc/Changelog: * toplev.c (warn_deprecated_use): Check that the deprecation string is non-null before trying to obtain a pointer to it. * c-common.c(handle_deprecated_attribute): Add deprecation attributes even when there is no supplied message. gcc/testsuite/Changelog: * gcc/gcc.dg/pr43797.c: New. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43797