Commit b6ff777c by Zack Weinberg

c-lex.c (cb_def_pragma): Clean up code for making location palatable to diagnostic.c.

	* c-lex.c (cb_def_pragma): Clean up code for making location
	palatable to diagnostic.c.

From-SVN: r89691
parent 12525dd6
2004-10-27 Zack Weinberg <zack@codesourcery.com>
* c-lex.c (cb_def_pragma): Clean up code for making location
palatable to diagnostic.c.
2004-10-27 Steven Bosscher <stevenb@suse.de> 2004-10-27 Steven Bosscher <stevenb@suse.de>
PR tree-optimization/17757 PR tree-optimization/17757
...@@ -25,7 +30,7 @@ ...@@ -25,7 +30,7 @@
patch originally created by Kelley Cook <kcook@gcc.gnu.org> patch originally created by Kelley Cook <kcook@gcc.gnu.org>
PR middle-end/14684 PR middle-end/14684
* opts.c (OPT_fprofile_generate): Default to -funroll-loops * opts.c (OPT_fprofile_generate): Default to -funroll-loops
to match -fprofile-use. to match -fprofile-use.
2004-10-27 Kazu Hirata <kazu@cs.umass.edu> 2004-10-27 Kazu Hirata <kazu@cs.umass.edu>
......
...@@ -283,11 +283,16 @@ cb_def_pragma (cpp_reader *pfile, source_location loc) ...@@ -283,11 +283,16 @@ cb_def_pragma (cpp_reader *pfile, source_location loc)
-Wunknown-pragmas has been given. */ -Wunknown-pragmas has been given. */
if (warn_unknown_pragmas > in_system_header) if (warn_unknown_pragmas > in_system_header)
{ {
const unsigned char *space, *name;
const cpp_token *s;
#ifndef USE_MAPPED_LOCATION #ifndef USE_MAPPED_LOCATION
location_t fe_loc;
const struct line_map *map = linemap_lookup (&line_table, loc); const struct line_map *map = linemap_lookup (&line_table, loc);
fe_loc.file = map->to_file;
fe_loc.line = SOURCE_LINE (map, loc);
#else
location_t fe_loc = loc;
#endif #endif
const unsigned char *space, *name;
const cpp_token *s;
space = name = (const unsigned char *) ""; space = name = (const unsigned char *) "";
s = cpp_get_token (pfile); s = cpp_get_token (pfile);
...@@ -299,12 +304,7 @@ cb_def_pragma (cpp_reader *pfile, source_location loc) ...@@ -299,12 +304,7 @@ cb_def_pragma (cpp_reader *pfile, source_location loc)
name = cpp_token_as_text (pfile, s); name = cpp_token_as_text (pfile, s);
} }
#ifdef USE_MAPPED_LOCATION warning ("%Hignoring #pragma %s %s", &fe_loc, space, name);
input_location = loc;
#else
input_line = SOURCE_LINE (map, loc);
#endif
warning ("ignoring #pragma %s %s", space, name);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment