aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorAlexander Malmberg <alexander@malmberg.org>2005-01-26 21:01:57 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2005-01-26 13:01:57 -0800
commitb0676216f76cfaa953313ab10c9e48df4d381cd2 (patch)
tree9f15882928d0605fe41334144f51d727c9154e19 /gcc/objc
parente4dd71deb765f87955ae21da06e75de7871c1e41 (diff)
downloadgcc-b0676216f76cfaa953313ab10c9e48df4d381cd2.zip
gcc-b0676216f76cfaa953313ab10c9e48df4d381cd2.tar.gz
gcc-b0676216f76cfaa953313ab10c9e48df4d381cd2.tar.bz2
re PR objc/18862 (ICE on gcc-4.0-20041205/gcc/testsuite/objc.dg/selector-1.m)
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
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog7
-rw-r--r--gcc/objc/objc-act.c11
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index bdd79fe..5d311f1 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -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
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index fff747b..8fd6257 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -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));