X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fcond.c;h=824ba776c9816c64cd092e799720a77519c3af07;hb=39a0d071ae10ab953d6bb986ec40996c771db78f;hp=26499763efebde2c296100a4f132ebe3c79b2c5a;hpb=da7119c99c41f60cb178b0b9729d9f7880f33c86;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/cond.c b/gas/cond.c index 26499763ef..824ba776c9 100644 --- a/gas/cond.c +++ b/gas/cond.c @@ -1,5 +1,5 @@ /* cond.c - conditional assembly pseudo-ops, and .include - Copyright (C) 1990-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2016 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -29,7 +29,7 @@ struct obstack cond_obstack; struct file_line { - char *file; + const char *file; unsigned int line; }; @@ -77,7 +77,7 @@ s_ifdef (int test_defined) SKIP_WHITESPACE (); name = input_line_pointer; - if (!is_name_beginner (*name)) + if (!is_name_beginner (*name) && *name != '"') { as_bad (_("invalid identifier for \".ifdef\"")); obstack_1grow (&cond_obstack, 0); @@ -85,9 +85,9 @@ s_ifdef (int test_defined) return; } - c = get_symbol_end (); + c = get_symbol_name (& name); symbolP = symbol_find (name); - *input_line_pointer = c; + (void) restore_line_pointer (c); initialize_cframe (&cframe); @@ -317,8 +317,8 @@ s_elseif (int arg) } else { - as_where (¤t_cframe->else_file_line.file, - ¤t_cframe->else_file_line.line); + current_cframe->else_file_line.file + = as_where (¤t_cframe->else_file_line.line); current_cframe->dead_tree |= !current_cframe->ignoring; current_cframe->ignoring = current_cframe->dead_tree; @@ -423,8 +423,8 @@ s_else (int arg ATTRIBUTE_UNUSED) } else { - as_where (¤t_cframe->else_file_line.file, - ¤t_cframe->else_file_line.line); + current_cframe->else_file_line.file + = as_where (¤t_cframe->else_file_line.line); current_cframe->ignoring = current_cframe->dead_tree | !current_cframe->ignoring; @@ -527,8 +527,8 @@ static void initialize_cframe (struct conditional_frame *cframe) { memset (cframe, 0, sizeof (*cframe)); - as_where (&cframe->if_file_line.file, - &cframe->if_file_line.line); + cframe->if_file_line.file + = as_where (&cframe->if_file_line.line); cframe->previous_cframe = current_cframe; cframe->dead_tree = current_cframe != NULL && current_cframe->ignoring; cframe->macro_nest = macro_nest;