aboutsummaryrefslogtreecommitdiff
path: root/libcpp/macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/macro.c')
-rw-r--r--libcpp/macro.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/libcpp/macro.c b/libcpp/macro.c
index 1e0a0b5..f76e10b 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -141,7 +141,7 @@ static inline const cpp_token **tokens_buff_put_token_to (const cpp_token **,
const cpp_token *,
source_location,
source_location,
- const struct line_map *,
+ const line_map_macro *,
unsigned int);
static const cpp_token **tokens_buff_add_token (_cpp_buff *,
@@ -149,7 +149,7 @@ static const cpp_token **tokens_buff_add_token (_cpp_buff *,
const cpp_token *,
source_location,
source_location,
- const struct line_map *,
+ const line_map_macro *,
unsigned int);
static inline void tokens_buff_remove_last_token (_cpp_buff *);
static void replace_args (cpp_reader *, cpp_hashnode *, cpp_macro *,
@@ -195,7 +195,9 @@ _cpp_warn_if_unused_macro (cpp_reader *pfile, cpp_hashnode *node,
cpp_macro *macro = node->value.macro;
if (!macro->used
- && MAIN_FILE_P (linemap_lookup (pfile->line_table, macro->line)))
+ && MAIN_FILE_P (linemap_check_ordinary
+ (linemap_lookup (pfile->line_table,
+ macro->line))))
cpp_warning_with_line (pfile, CPP_W_UNUSED_MACROS, macro->line, 0,
"macro \"%s\" is not used", NODE_NAME (node));
}
@@ -453,7 +455,7 @@ builtin_macro (cpp_reader *pfile, cpp_hashnode *node, source_location loc)
macro. */
source_location *virt_locs = NULL;
_cpp_buff *token_buf = tokens_buff_new (pfile, 1, &virt_locs);
- const line_map * map =
+ const line_map_macro * map =
linemap_enter_macro (pfile->line_table, node,
token->src_loc, 1);
tokens_buff_add_token (token_buf, virt_locs, token,
@@ -1167,7 +1169,7 @@ enter_macro_context (cpp_reader *pfile, cpp_hashnode *node,
{
unsigned int i;
const cpp_token *src = macro->exp.tokens;
- const struct line_map *map;
+ const line_map_macro *map;
source_location *virt_locs = NULL;
_cpp_buff *macro_tokens
= tokens_buff_new (pfile, tokens_count, &virt_locs);
@@ -1535,7 +1537,7 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro,
_cpp_buff *buff = NULL;
source_location *virt_locs = NULL;
unsigned int exp_count;
- const struct line_map *map = NULL;
+ const line_map_macro *map = NULL;
int track_macro_exp;
/* First, fully macro-expand arguments, calculating the number of
@@ -2066,7 +2068,7 @@ tokens_buff_put_token_to (const cpp_token **dest,
const cpp_token *token,
source_location virt_loc,
source_location parm_def_loc,
- const struct line_map *map,
+ const line_map_macro *map,
unsigned int macro_token_index)
{
source_location macro_loc = virt_loc;
@@ -2111,7 +2113,7 @@ tokens_buff_add_token (_cpp_buff *buffer,
const cpp_token *token,
source_location virt_loc,
source_location parm_def_loc,
- const struct line_map *map,
+ const line_map_macro *map,
unsigned int macro_token_index)
{
const cpp_token **result;