mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 05:10:25 +08:00
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
This commit is contained in:
parent
12525dd626
commit
b6ff777cfc
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
PR tree-optimization/17757
|
||||
@ -25,7 +30,7 @@
|
||||
patch originally created by Kelley Cook <kcook@gcc.gnu.org>
|
||||
|
||||
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.
|
||||
|
||||
2004-10-27 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
18
gcc/c-lex.c
18
gcc/c-lex.c
@ -283,11 +283,16 @@ cb_def_pragma (cpp_reader *pfile, source_location loc)
|
||||
-Wunknown-pragmas has been given. */
|
||||
if (warn_unknown_pragmas > in_system_header)
|
||||
{
|
||||
#ifndef USE_MAPPED_LOCATION
|
||||
const struct line_map *map = linemap_lookup (&line_table, loc);
|
||||
#endif
|
||||
const unsigned char *space, *name;
|
||||
const cpp_token *s;
|
||||
#ifndef USE_MAPPED_LOCATION
|
||||
location_t fe_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
|
||||
|
||||
space = name = (const unsigned char *) "";
|
||||
s = cpp_get_token (pfile);
|
||||
@ -299,12 +304,7 @@ cb_def_pragma (cpp_reader *pfile, source_location loc)
|
||||
name = cpp_token_as_text (pfile, s);
|
||||
}
|
||||
|
||||
#ifdef USE_MAPPED_LOCATION
|
||||
input_location = loc;
|
||||
#else
|
||||
input_line = SOURCE_LINE (map, loc);
|
||||
#endif
|
||||
warning ("ignoring #pragma %s %s", space, name);
|
||||
warning ("%Hignoring #pragma %s %s", &fe_loc, space, name);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user