re PR objc/18862 (ICE on gcc-4.0-20041205/gcc/testsuite/objc.dg/selector-1.m)
authorAlexander Malmberg <alexander@malmberg.org>
Wed, 26 Jan 2005 21:01:57 +0000 (21:01 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Wed, 26 Jan 2005 21:01:57 +0000 (13:01 -0800)
2005-01-26  Alexander Malmberg  <alexander@malmberg.org>

        PR objc/18862
        * objc-act.c (build_selector_translation_table): Use
        input_location in the diagnostic for the GNU runtime or if
        TREE_PURPOSE (chain) is NULL.

From-SVN: r94285

gcc/objc/ChangeLog
gcc/objc/objc-act.c

index bdd79fe3b8fc14b3d370af5733151035533c20b2..5d311f1ff00fdb00b9ac0077a85044c20361a9f5 100644 (file)
@@ -1,3 +1,10 @@
+2005-01-26  Alexander Malmberg  <alexander@malmberg.org>
+
+       PR objc/18862
+       * objc-act.c (build_selector_translation_table): Use
+       input_location in the diagnostic for the GNU runtime or if
+       TREE_PURPOSE (chain) is NULL.
+
 2005-01-25  Alexander Malmberg  <alexander@malmberg.org>
 
        PR objc/18408
index fff747bf29d52300ffa32102c559f44b105de78a..8fd6257915eae92932d48fe5265ce00681ddd424 100644 (file)
@@ -2364,8 +2364,15 @@ build_selector_translation_table (void)
               }
           }
         if (!found)
-         warning ("%Jcreating selector for nonexistent method %qE",
-                  TREE_PURPOSE (chain), TREE_VALUE (chain));
+         {
+           location_t *loc;
+           if (flag_next_runtime && TREE_PURPOSE (chain))
+             loc = &DECL_SOURCE_LOCATION (TREE_PURPOSE (chain));
+           else
+             loc = &input_location;
+           warning ("%Hcreating selector for nonexistent method %qE",
+                    loc, TREE_VALUE (chain));
+         }
       }
 
       expr = build_selector (TREE_VALUE (chain));