This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ObjC fixes for --enable-mapped-location
- From: Per Bothner <per at bothner dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ziemowit Laski <zlaski at ziemas dot net>
- Date: Thu, 23 Sep 2004 12:36:53 -0700
- Subject: Re: ObjC fixes for --enable-mapped-location
- References: <874qloerg1.fsf@codesourcery.com>
Zack Weinberg wrote:
This patch makes it possible to bootstrap GCC with
--enable-mapped-location --enable-languages=c,c++,objc.
I did a quick-and-dirty (untested) obj patch too. The only interesting
difference is where you did:
@@ -2305,15 +2309,12 @@ build_selector_translation_table (void)
}
}
if (!found)
- {
- /* Adjust line number for warning message. */
- int save_lineno = input_line;
- if (flag_next_runtime && TREE_PURPOSE (chain))
- input_line = DECL_SOURCE_LINE (TREE_PURPOSE (chain));
- warning ("creating selector for non existant method %s",
- IDENTIFIER_POINTER (TREE_VALUE (chain)));
- input_line = save_lineno;
- }
+ /* ??? if (flag_next_runtime && DECL_P (TREE_PURPOSE (chain)))
+ diagnostic
+ else
+ same diagnostic but without %J */
+ warning ("%Jcreating selector for nonexistent method %qE",
+ TREE_PURPOSE (chain), TREE_VALUE (chain));
}
expr = build_selector (TREE_VALUE (chain));
I did:
@@ -2307,12 +2309,12 @@ build_selector_translation_table (void)
if (!found)
{
/* Adjust line number for warning message. */
- int save_lineno = input_line;
+ location_t save_location = input_location;
if (flag_next_runtime && TREE_PURPOSE (chain))
- input_line = DECL_SOURCE_LINE (TREE_PURPOSE (chain));
+ input_location = DECL_SOURCE_LOCATION (TREE_PURPOSE (chain));
warning ("creating selector for non existant method %s",
IDENTIFIER_POINTER (TREE_VALUE (chain)));
- input_line = save_lineno;
+ input_location = save_location;
}
}
Using %J is probably better, though I don't know the issues that
made you put in the ???. Since Zem is happy with your version, I'm too.
[I'm back home, building the compiler so I can do
tests and measurements of my big Java patch.]
--
--Per Bothner
per@bothner.com http://per.bothner.com/