Commit a28c5035 by Neil Booth Committed by Neil Booth

cppexp.c (lex): Use NODE_NAME and NODE_LEN.

	* cppexp.c (lex): Use NODE_NAME and NODE_LEN.
	* cpphash.c (_cpp_lookup_with_hash): Similarly.
	* cpplex.c (cpp_ideq, parse_identifier, cpp_token_len,
	cpp_spell_token, cpp_output_token): Similarly.
	* cpplib.c (lex_macro_node, do_undef, do_pragma,
	do_pragma_poison, parse_assertion, do_assert): Similarly.
	* cppmacro.c (builtin_macro, parse_args, funlike_invocation_p,
	save_parameter, _cpp_create_definition, check_trad_stringification,
	cpp_macro_definition): Similarly.
	* cppmain.c (cb_define, cb_undef, dump_macro): Similarly.
	* c-lex.c (cb_undef, c_lex): Similarly.
	* fix-header.c (recognized_function): Similarly.
	* cpplib.h (NODE_LEN, NODE_NAME): New.
	(cpp_hashnode): Rename length len.

From-SVN: r42174
parent a50882dc
2001-05-16 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* cppexp.c (lex): Use NODE_NAME and NODE_LEN.
* cpphash.c (_cpp_lookup_with_hash): Similarly.
* cpplex.c (cpp_ideq, parse_identifier, cpp_token_len,
cpp_spell_token, cpp_output_token): Similarly.
* cpplib.c (lex_macro_node, do_undef, do_pragma,
do_pragma_poison, parse_assertion, do_assert): Similarly.
* cppmacro.c (builtin_macro, parse_args, funlike_invocation_p,
save_parameter, _cpp_create_definition, check_trad_stringification,
cpp_macro_definition): Similarly.
* cppmain.c (cb_define, cb_undef, dump_macro): Similarly.
* c-lex.c (cb_undef, c_lex): Similarly.
* fix-header.c (recognized_function): Similarly.
* cpplib.h (NODE_LEN, NODE_NAME): New.
(cpp_hashnode): Rename length len.
Wed May 16 13:41:10 2001 Jeffrey A Law (law@cygnus.com) Wed May 16 13:41:10 2001 Jeffrey A Law (law@cygnus.com)
* pa32-regs.h (HARD_REGNO_MODE_OK): Allow TI/TFmode values in * pa32-regs.h (HARD_REGNO_MODE_OK): Allow TI/TFmode values in
......
...@@ -347,7 +347,7 @@ cb_undef (pfile, node) ...@@ -347,7 +347,7 @@ cb_undef (pfile, node)
cpp_reader *pfile ATTRIBUTE_UNUSED; cpp_reader *pfile ATTRIBUTE_UNUSED;
cpp_hashnode *node; cpp_hashnode *node;
{ {
debug_undef (lineno, (const char *) node->name); debug_undef (lineno, (const char *) NODE_NAME (node));
} }
/* Parse a '\uNNNN' or '\UNNNNNNNN' sequence. /* Parse a '\uNNNN' or '\UNNNNNNNN' sequence.
...@@ -997,7 +997,7 @@ c_lex (value) ...@@ -997,7 +997,7 @@ c_lex (value)
goto retry; goto retry;
case CPP_NAME: case CPP_NAME:
*value = get_identifier ((const char *)tok.val.node->name); *value = get_identifier ((const char *) NODE_NAME (tok.val.node));
break; break;
case CPP_INT: case CPP_INT:
......
...@@ -345,7 +345,7 @@ lex (pfile, skip_evaluation, token) ...@@ -345,7 +345,7 @@ lex (pfile, skip_evaluation, token)
if (CPP_PEDANTIC (pfile) if (CPP_PEDANTIC (pfile)
&& ! cpp_defined (pfile, DSC("__bool_true_false_are_defined"))) && ! cpp_defined (pfile, DSC("__bool_true_false_are_defined")))
cpp_pedwarn (pfile, "ISO C++ does not permit \"%s\" in #if", cpp_pedwarn (pfile, "ISO C++ does not permit \"%s\" in #if",
token->val.node->name); NODE_NAME (token->val.node));
return op; return op;
} }
else else
...@@ -359,7 +359,8 @@ lex (pfile, skip_evaluation, token) ...@@ -359,7 +359,8 @@ lex (pfile, skip_evaluation, token)
op.value = 0; op.value = 0;
if (CPP_OPTION (pfile, warn_undef) && !skip_evaluation) if (CPP_OPTION (pfile, warn_undef) && !skip_evaluation)
cpp_warning (pfile, "\"%s\" is not defined", token->val.node->name); cpp_warning (pfile, "\"%s\" is not defined",
NODE_NAME (token->val.node));
return op; return op;
} }
......
...@@ -136,8 +136,8 @@ _cpp_lookup_with_hash (pfile, len, hash) ...@@ -136,8 +136,8 @@ _cpp_lookup_with_hash (pfile, len, hash)
{ {
unsigned int hash2; unsigned int hash2;
if (entry->hash == hash && entry->length == len if (entry->hash == hash && NODE_LEN (entry) == len
&& !memcmp (entry->name, name, len)) && !memcmp (NODE_NAME (entry), name, len))
return entry; return entry;
hash2 = 1 + hash % (size - 2); hash2 = 1 + hash % (size - 2);
...@@ -151,8 +151,8 @@ _cpp_lookup_with_hash (pfile, len, hash) ...@@ -151,8 +151,8 @@ _cpp_lookup_with_hash (pfile, len, hash)
if (entry == NULL) if (entry == NULL)
break; break;
if (entry->hash == hash && entry->length == len if (entry->hash == hash && NODE_LEN (entry) == len
&& !memcmp (entry->name, name, len)) && !memcmp (NODE_NAME (entry), name, len))
return entry; return entry;
} }
} }
...@@ -168,9 +168,9 @@ _cpp_lookup_with_hash (pfile, len, hash) ...@@ -168,9 +168,9 @@ _cpp_lookup_with_hash (pfile, len, hash)
entry->flags = 0; entry->flags = 0;
entry->directive_index = 0; entry->directive_index = 0;
entry->arg_index = 0; entry->arg_index = 0;
entry->length = len; NODE_LEN (entry) = len;
entry->hash = hash; entry->hash = hash;
entry->name = name; NODE_NAME (entry) = name;
entry->value.macro = 0; entry->value.macro = 0;
pfile->hashtab->nelts++; pfile->hashtab->nelts++;
......
...@@ -121,7 +121,7 @@ cpp_ideq (token, string) ...@@ -121,7 +121,7 @@ cpp_ideq (token, string)
if (token->type != CPP_NAME) if (token->type != CPP_NAME)
return 0; return 0;
return !ustrcmp (token->val.node->name, (const U_CHAR *) string); return !ustrcmp (NODE_NAME (token->val.node), (const U_CHAR *) string);
} }
/* Call when meeting a newline. Returns the character after the newline /* Call when meeting a newline. Returns the character after the newline
...@@ -535,7 +535,8 @@ parse_identifier (pfile, c) ...@@ -535,7 +535,8 @@ parse_identifier (pfile, c)
{ {
/* It is allowed to poison the same identifier twice. */ /* It is allowed to poison the same identifier twice. */
if ((result->flags & NODE_POISONED) && !pfile->state.poisoned_ok) if ((result->flags & NODE_POISONED) && !pfile->state.poisoned_ok)
cpp_error (pfile, "attempt to use poisoned \"%s\"", result->name); cpp_error (pfile, "attempt to use poisoned \"%s\"",
NODE_NAME (result));
/* Constraint 6.10.3.5: __VA_ARGS__ should only appear in the /* Constraint 6.10.3.5: __VA_ARGS__ should only appear in the
replacement list of a variadic macro. */ replacement list of a variadic macro. */
...@@ -1290,9 +1291,9 @@ cpp_token_len (token) ...@@ -1290,9 +1291,9 @@ cpp_token_len (token)
switch (TOKEN_SPELL (token)) switch (TOKEN_SPELL (token))
{ {
default: len = 0; break; default: len = 0; break;
case SPELL_STRING: len = token->val.str.len; break; case SPELL_STRING: len = token->val.str.len; break;
case SPELL_IDENT: len = token->val.node->length; break; case SPELL_IDENT: len = NODE_LEN (token->val.node); break;
} }
/* 1 for whitespace, 4 for comment delimeters. */ /* 1 for whitespace, 4 for comment delimeters. */
return len + 5; return len + 5;
...@@ -1330,8 +1331,8 @@ cpp_spell_token (pfile, token, buffer) ...@@ -1330,8 +1331,8 @@ cpp_spell_token (pfile, token, buffer)
case SPELL_IDENT: case SPELL_IDENT:
spell_ident: spell_ident:
memcpy (buffer, token->val.node->name, token->val.node->length); memcpy (buffer, NODE_NAME (token->val.node), NODE_LEN (token->val.node));
buffer += token->val.node->length; buffer += NODE_LEN (token->val.node);
break; break;
case SPELL_STRING: case SPELL_STRING:
...@@ -1421,7 +1422,7 @@ cpp_output_token (token, fp) ...@@ -1421,7 +1422,7 @@ cpp_output_token (token, fp)
spell_ident: spell_ident:
case SPELL_IDENT: case SPELL_IDENT:
ufputs (token->val.node->name, fp); ufputs (NODE_NAME (token->val.node), fp);
break; break;
case SPELL_STRING: case SPELL_STRING:
......
...@@ -454,7 +454,7 @@ lex_macro_node (pfile) ...@@ -454,7 +454,7 @@ lex_macro_node (pfile)
else if (token.flags & NAMED_OP) else if (token.flags & NAMED_OP)
cpp_error (pfile, cpp_error (pfile,
"\"%s\" cannot be used as a macro name as it is an operator in C++", "\"%s\" cannot be used as a macro name as it is an operator in C++",
token.val.node->name); NODE_NAME (token.val.node));
else else
cpp_error (pfile, "macro names must be identifiers"); cpp_error (pfile, "macro names must be identifiers");
} }
...@@ -464,8 +464,9 @@ lex_macro_node (pfile) ...@@ -464,8 +464,9 @@ lex_macro_node (pfile)
/* In Objective C, some keywords begin with '@', but general /* In Objective C, some keywords begin with '@', but general
identifiers do not, and you're not allowed to #define them. */ identifiers do not, and you're not allowed to #define them. */
if (node == pfile->spec_nodes.n_defined || node->name[0] == '@') if (node == pfile->spec_nodes.n_defined || NODE_NAME (node)[0] == '@')
cpp_error (pfile, "\"%s\" cannot be used as a macro name", node->name); cpp_error (pfile, "\"%s\" cannot be used as a macro name",
NODE_NAME (node));
else if (!(node->flags & NODE_POISONED)) else if (!(node->flags & NODE_POISONED))
return node; return node;
} }
...@@ -503,7 +504,7 @@ do_undef (pfile) ...@@ -503,7 +504,7 @@ do_undef (pfile)
(*pfile->cb.undef) (pfile, node); (*pfile->cb.undef) (pfile, node);
if (node->flags & NODE_WARN) if (node->flags & NODE_WARN)
cpp_warning (pfile, "undefining \"%s\"", node->name); cpp_warning (pfile, "undefining \"%s\"", NODE_NAME (node));
_cpp_free_definition (node); _cpp_free_definition (node);
} }
...@@ -1031,9 +1032,6 @@ do_pragma (pfile) ...@@ -1031,9 +1032,6 @@ do_pragma (pfile)
{ {
const struct pragma_entry *p; const struct pragma_entry *p;
cpp_token tok; cpp_token tok;
const cpp_hashnode *node;
const U_CHAR *name;
size_t len;
int drop = 0; int drop = 0;
p = pfile->pragmas; p = pfile->pragmas;
...@@ -1044,9 +1042,10 @@ do_pragma (pfile) ...@@ -1044,9 +1042,10 @@ do_pragma (pfile)
cpp_get_token (pfile, &tok); cpp_get_token (pfile, &tok);
if (tok.type == CPP_NAME) if (tok.type == CPP_NAME)
{ {
node = tok.val.node; const cpp_hashnode *node = tok.val.node;
name = node->name; const U_CHAR *name = NODE_NAME (node);
len = node->length; size_t len = NODE_LEN (node);
while (p) while (p)
{ {
if (strlen (p->name) == len && !memcmp (p->name, name, len)) if (strlen (p->name) == len && !memcmp (p->name, name, len))
...@@ -1114,7 +1113,7 @@ do_pragma_poison (pfile) ...@@ -1114,7 +1113,7 @@ do_pragma_poison (pfile)
continue; continue;
if (hp->type == NT_MACRO) if (hp->type == NT_MACRO)
cpp_warning (pfile, "poisoning existing macro \"%s\"", hp->name); cpp_warning (pfile, "poisoning existing macro \"%s\"", NODE_NAME (hp));
_cpp_free_definition (hp); _cpp_free_definition (hp);
hp->flags |= NODE_POISONED | NODE_DIAGNOSTIC; hp->flags |= NODE_POISONED | NODE_DIAGNOSTIC;
} }
...@@ -1542,12 +1541,12 @@ parse_assertion (pfile, answerp, type) ...@@ -1542,12 +1541,12 @@ parse_assertion (pfile, answerp, type)
cpp_error (pfile, "predicate must be an identifier"); cpp_error (pfile, "predicate must be an identifier");
else if (parse_answer (pfile, answerp, type) == 0) else if (parse_answer (pfile, answerp, type) == 0)
{ {
unsigned int len = predicate.val.node->length; unsigned int len = NODE_LEN (predicate.val.node);
unsigned char *sym = alloca (len + 1); unsigned char *sym = alloca (len + 1);
/* Prefix '#' to get it out of macro namespace. */ /* Prefix '#' to get it out of macro namespace. */
sym[0] = '#'; sym[0] = '#';
memcpy (sym + 1, predicate.val.node->name, len); memcpy (sym + 1, NODE_NAME (predicate.val.node), len);
result = cpp_lookup (pfile, sym, len + 1); result = cpp_lookup (pfile, sym, len + 1);
} }
...@@ -1620,7 +1619,7 @@ do_assert (pfile) ...@@ -1620,7 +1619,7 @@ do_assert (pfile)
{ {
if (*find_answer (node, new_answer)) if (*find_answer (node, new_answer))
{ {
cpp_warning (pfile, "\"%s\" re-asserted", node->name + 1); cpp_warning (pfile, "\"%s\" re-asserted", NODE_NAME (node) + 1);
return; return;
} }
new_answer->next = node->value.answers; new_answer->next = node->value.answers;
......
...@@ -466,17 +466,14 @@ enum builtin_type ...@@ -466,17 +466,14 @@ enum builtin_type
BT_STDC /* `__STDC__' */ BT_STDC /* `__STDC__' */
}; };
/* There is a slot in the hashnode for use by front ends when integrated #define NODE_LEN(NODE) (NODE->len)
with cpplib. It holds a tree (see tree.h) but we mustn't drag that #define NODE_NAME(NODE) (NODE->name)
header into every user of cpplib.h. cpplib does not do anything with
this slot except clear it when a new node is created. */
union tree_node;
struct cpp_hashnode struct cpp_hashnode
{ {
const unsigned char *name; /* Null-terminated name. */ const unsigned char *name; /* Null-terminated name. */
unsigned int hash; /* Cached hash value. */ unsigned int hash; /* Cached hash value. */
unsigned short length; /* Length of name excluding null. */ unsigned short len; /* Length of name excluding null. */
unsigned short arg_index; /* Macro argument index. */ unsigned short arg_index; /* Macro argument index. */
unsigned char directive_index; /* Index into directive table. */ unsigned char directive_index; /* Index into directive table. */
ENUM_BITFIELD(node_type) type : 8; /* Node type. */ ENUM_BITFIELD(node_type) type : 8; /* Node type. */
......
...@@ -210,7 +210,7 @@ builtin_macro (pfile, token) ...@@ -210,7 +210,7 @@ builtin_macro (pfile, token)
break; break;
default: default:
cpp_ice (pfile, "invalid builtin macro \"%s\"", node->name); cpp_ice (pfile, "invalid builtin macro \"%s\"", NODE_NAME (node));
break; break;
} }
...@@ -537,7 +537,7 @@ parse_args (pfile, node) ...@@ -537,7 +537,7 @@ parse_args (pfile, node)
if (type == CPP_EOF) if (type == CPP_EOF)
{ {
cpp_error (pfile, "unterminated argument list invoking macro \"%s\"", cpp_error (pfile, "unterminated argument list invoking macro \"%s\"",
node->name); NODE_NAME (node));
error = 1; error = 1;
} }
else if (argc < macro->paramc) else if (argc < macro->paramc)
...@@ -559,7 +559,7 @@ parse_args (pfile, node) ...@@ -559,7 +559,7 @@ parse_args (pfile, node)
{ {
cpp_error (pfile, cpp_error (pfile,
"macro \"%s\" requires %u arguments, but only %u given", "macro \"%s\" requires %u arguments, but only %u given",
node->name, macro->paramc, argc); NODE_NAME (node), macro->paramc, argc);
error = 1; error = 1;
} }
} }
...@@ -570,7 +570,7 @@ parse_args (pfile, node) ...@@ -570,7 +570,7 @@ parse_args (pfile, node)
{ {
cpp_error (pfile, cpp_error (pfile,
"macro \"%s\" passed %u arguments, but takes just %u", "macro \"%s\" passed %u arguments, but takes just %u",
node->name, argc, macro->paramc); NODE_NAME (node), argc, macro->paramc);
error = 1; error = 1;
} }
} }
...@@ -610,7 +610,7 @@ funlike_invocation_p (pfile, node, list) ...@@ -610,7 +610,7 @@ funlike_invocation_p (pfile, node, list)
else if (CPP_WTRADITIONAL (pfile) && ! node->value.macro->syshdr) else if (CPP_WTRADITIONAL (pfile) && ! node->value.macro->syshdr)
cpp_warning (pfile, cpp_warning (pfile,
"function-like macro \"%s\" must be used with arguments in traditional C", "function-like macro \"%s\" must be used with arguments in traditional C",
node->name); NODE_NAME (node));
/* Restore original context. */ /* Restore original context. */
pfile->context = orig; pfile->context = orig;
...@@ -1233,7 +1233,7 @@ save_parameter (pfile, macro, node) ...@@ -1233,7 +1233,7 @@ save_parameter (pfile, macro, node)
/* Constraint 6.10.3.6 - duplicate parameter names. */ /* Constraint 6.10.3.6 - duplicate parameter names. */
if (node->arg_index) if (node->arg_index)
{ {
cpp_error (pfile, "duplicate macro parameter \"%s\"", node->name); cpp_error (pfile, "duplicate macro parameter \"%s\"", NODE_NAME (node));
return 1; return 1;
} }
...@@ -1475,7 +1475,7 @@ _cpp_create_definition (pfile, node) ...@@ -1475,7 +1475,7 @@ _cpp_create_definition (pfile, node)
{ {
cpp_pedwarn_with_line (pfile, pfile->directive_pos.line, cpp_pedwarn_with_line (pfile, pfile->directive_pos.line,
pfile->directive_pos.col, pfile->directive_pos.col,
"\"%s\" redefined", node->name); "\"%s\" redefined", NODE_NAME (node));
if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN))
cpp_pedwarn_with_file_and_line (pfile, cpp_pedwarn_with_file_and_line (pfile,
...@@ -1489,7 +1489,7 @@ _cpp_create_definition (pfile, node) ...@@ -1489,7 +1489,7 @@ _cpp_create_definition (pfile, node)
/* Enter definition in hash table. */ /* Enter definition in hash table. */
node->type = NT_MACRO; node->type = NT_MACRO;
node->value.macro = macro; node->value.macro = macro;
if (! ustrncmp (node->name, DSC ("__STDC_"))) if (! ustrncmp (NODE_NAME (node), DSC ("__STDC_")))
node->flags |= NODE_WARN; node->flags |= NODE_WARN;
cleanup: cleanup:
...@@ -1536,11 +1536,11 @@ check_trad_stringification (pfile, macro, string) ...@@ -1536,11 +1536,11 @@ check_trad_stringification (pfile, macro, string)
{ {
const cpp_hashnode *node = macro->params[i]; const cpp_hashnode *node = macro->params[i];
if (node->length == len && !memcmp (p, node->name, len)) if (NODE_LEN (node) == len && !memcmp (p, NODE_NAME (node), len))
{ {
cpp_warning (pfile, cpp_warning (pfile,
"macro argument \"%s\" would be stringified with -traditional.", "macro argument \"%s\" would be stringified with -traditional.",
node->name); NODE_NAME (node));
break; break;
} }
} }
...@@ -1573,7 +1573,7 @@ cpp_macro_definition (pfile, node) ...@@ -1573,7 +1573,7 @@ cpp_macro_definition (pfile, node)
{ {
len += 3; /* "()" plus possible final "." of ellipsis. */ len += 3; /* "()" plus possible final "." of ellipsis. */
for (i = 0; i < macro->paramc; i++) for (i = 0; i < macro->paramc; i++)
len += macro->params[i]->length + 2; /* ", " */ len += NODE_LEN (macro->params[i]) + 2; /* ", " */
} }
for (i = 0; i < macro->count; i++) for (i = 0; i < macro->count; i++)
...@@ -1581,7 +1581,7 @@ cpp_macro_definition (pfile, node) ...@@ -1581,7 +1581,7 @@ cpp_macro_definition (pfile, node)
cpp_token *token = &macro->expansion[i]; cpp_token *token = &macro->expansion[i];
if (token->type == CPP_MACRO_ARG) if (token->type == CPP_MACRO_ARG)
len += macro->params[token->val.arg_no - 1]->length; len += NODE_LEN (macro->params[token->val.arg_no - 1]);
else else
len += cpp_token_len (token); /* Includes room for ' '. */ len += cpp_token_len (token); /* Includes room for ' '. */
if (token->flags & STRINGIFY_ARG) if (token->flags & STRINGIFY_ARG)
...@@ -1607,8 +1607,8 @@ cpp_macro_definition (pfile, node) ...@@ -1607,8 +1607,8 @@ cpp_macro_definition (pfile, node)
if (param != pfile->spec_nodes.n__VA_ARGS__) if (param != pfile->spec_nodes.n__VA_ARGS__)
{ {
memcpy (buffer, param->name, param->length); memcpy (buffer, NODE_NAME (param), NODE_LEN (param));
buffer += param->length; buffer += NODE_LEN (param);
} }
if (i + 1 < macro->paramc) if (i + 1 < macro->paramc)
...@@ -1634,8 +1634,9 @@ cpp_macro_definition (pfile, node) ...@@ -1634,8 +1634,9 @@ cpp_macro_definition (pfile, node)
if (token->type == CPP_MACRO_ARG) if (token->type == CPP_MACRO_ARG)
{ {
len = macro->params[token->val.arg_no - 1]->length; len = NODE_LEN (macro->params[token->val.arg_no - 1]);
memcpy (buffer, macro->params[token->val.arg_no - 1]->name, len); memcpy (buffer,
NODE_NAME (macro->params[token->val.arg_no - 1]), len);
buffer += len; buffer += len;
} }
else else
......
...@@ -364,7 +364,7 @@ cb_define (pfile, node) ...@@ -364,7 +364,7 @@ cb_define (pfile, node)
cpp_hashnode *node; cpp_hashnode *node;
{ {
maybe_print_line (cpp_get_line (pfile)->output_line); maybe_print_line (cpp_get_line (pfile)->output_line);
fprintf (print.outf, "#define %s", node->name); fprintf (print.outf, "#define %s", NODE_NAME (node));
/* -dD command line option. */ /* -dD command line option. */
if (options->dump_macros == dump_definitions) if (options->dump_macros == dump_definitions)
...@@ -380,7 +380,7 @@ cb_undef (pfile, node) ...@@ -380,7 +380,7 @@ cb_undef (pfile, node)
cpp_hashnode *node; cpp_hashnode *node;
{ {
maybe_print_line (cpp_get_line (pfile)->output_line); maybe_print_line (cpp_get_line (pfile)->output_line);
fprintf (print.outf, "#undef %s\n", node->name); fprintf (print.outf, "#undef %s\n", NODE_NAME (node));
print.lineno++; print.lineno++;
} }
...@@ -446,7 +446,7 @@ dump_macro (pfile, node, v) ...@@ -446,7 +446,7 @@ dump_macro (pfile, node, v)
{ {
if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN))
{ {
fprintf (print.outf, "#define %s", node->name); fprintf (print.outf, "#define %s", NODE_NAME (node));
fputs ((const char *) cpp_macro_definition (pfile, node), print.outf); fputs ((const char *) cpp_macro_definition (pfile, node), print.outf);
putc ('\n', print.outf); putc ('\n', print.outf);
print.lineno++; print.lineno++;
......
...@@ -532,8 +532,8 @@ recognized_function (fname, line, kind, have_arg_list) ...@@ -532,8 +532,8 @@ recognized_function (fname, line, kind, have_arg_list)
missing_extern_C_count++; missing_extern_C_count++;
#endif #endif
fn = lookup_std_proto ((const char *)fname->val.node->name, fn = lookup_std_proto ((const char *) NODE_NAME (fname->val.node),
fname->val.node->length); NODE_LEN (fname->val.node));
/* Remove the function from the list of required function. */ /* Remove the function from the list of required function. */
if (fn) if (fn)
......
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