diff options
Diffstat (limited to 'gcc/objc/objc-act.c')
| -rw-r--r-- | gcc/objc/objc-act.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 7ebb9f2a202..c16e57c7933 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -1886,6 +1886,32 @@ build_selector_translation_table () { tree expr; + if (warn_selector && objc_implementation_context) + { + tree method_chain; + bool found = false; + for (method_chain = meth_var_names_chain; + method_chain; + method_chain = TREE_CHAIN (method_chain)) + { + if (TREE_VALUE (method_chain) == TREE_VALUE (chain)) + { + found = true; + break; + } + } + if (!found) + { + /* Adjust line number for warning message. */ + int save_lineno = lineno; + if (flag_next_runtime && TREE_PURPOSE (chain)) + lineno = DECL_SOURCE_LINE (TREE_PURPOSE (chain)); + warning ("creating selector for non existant method %s", + IDENTIFIER_POINTER (TREE_VALUE (chain))); + lineno = save_lineno; + } + } + expr = build_selector (TREE_VALUE (chain)); if (flag_next_runtime) |

