> (declare_function_name): For __FUNCTION__ and __PRETTY_FUNCTION__...
authorRichard Stallman <rms@gnu.org>
Tue, 7 Jul 1992 01:46:27 +0000 (01:46 +0000)
committerRichard Stallman <rms@gnu.org>
Tue, 7 Jul 1992 01:46:27 +0000 (01:46 +0000)
> (declare_function_name): For __FUNCTION__ and __PRETTY_FUNCTION__,
set DECL_IN_SYSTEM_HEADER instead  of TREE_USED to supress `unused' warnings.

From-SVN: r1491

gcc/c-common.c

index 2714d67bcbc9aa05d029287ecc2ad76d8a450042..7ccad64a335e76f870de0a927c26f385958893fb 100644 (file)
@@ -54,7 +54,7 @@ declare_function_name ()
                     char_array_type_node);
   TREE_STATIC (decl) = 1;
   TREE_READONLY (decl) = 1;
-  TREE_USED (decl) = 1;
+  DECL_IN_SYSTEM_HEADER (decl) = 1;
   DECL_IGNORED_P (decl) = 1;
   init = build_string (strlen (name) + 1, name);
   TREE_TYPE (init) = char_array_type_node;
@@ -66,7 +66,7 @@ declare_function_name ()
                     char_array_type_node);
   TREE_STATIC (decl) = 1;
   TREE_READONLY (decl) = 1;
-  TREE_USED (decl) = 1;
+  DECL_IN_SYSTEM_HEADER (decl) = 1;
   DECL_IGNORED_P (decl) = 1;
   init = build_string (strlen (printable_name) + 1, printable_name);
   TREE_TYPE (init) = char_array_type_node;