gdb/c-exp.y: fprintf -> parser_fprintf
Switching GDB to make use of gnulib's C++ namespace support mode revealed these direct uses of fprintf in the C parser, where parser_fprintf should be used to handle rewiring stderr to gdb_stderr: ..../src/gdb/c-exp.y: In function ‘void c_print_token(FILE*, int, YYSTYPE)’: ..../src/gdb/c-exp.y:3220:45: error: call to ‘fprintf’ declared with attribute warning: The symbol ::fprintf refers to the system function. Use gnulib::fprintf instead. [-Werror] pulongest (value.typed_val_int.val)); ^ ..../src/gdb/c-exp.y:3231:62: error: call to ‘fprintf’ declared with attribute warning: The symbol ::fprintf refers to the system function. Use gnulib::fprintf instead. [-Werror] fprintf (file, "tsval<type=%d, %s>", value.tsval.type, copy); ^ ..../src/gdb/c-exp.y:3237:57: error: call to ‘fprintf’ declared with attribute warning: The symbol ::fprintf refers to the system function. Use gnulib::fprintf instead. [-Werror] fprintf (file, "sval<%s>", copy_name (value.sval)); ^ ..../src/gdb/c-exp.y:3243:39: error: call to ‘fprintf’ declared with attribute warning: The symbol ::fprintf refers to the system function. Use gnulib::fprintf instead. [-Werror] copy_name (value.tsym.stoken)); ^ ..../src/gdb/c-exp.y:3254:39: error: call to ‘fprintf’ declared with attribute warning: The symbol ::fprintf refers to the system function. Use gnulib::fprintf instead. [-Werror] value.ssym.is_a_field_of_this); ^ ..../src/gdb/c-exp.y:3258:70: error: call to ‘fprintf’ declared with attribute warning: The symbol ::fprintf refers to the system function. Use gnulib::fprintf instead. [-Werror] fprintf (file, "bval<%s>", host_address_to_string (value.bval)); ^ gdb/ChangeLog: 2016-11-17 Pedro Alves <palves@redhat.com> * c-exp.y (c_print_token): Use parser_fprintf instead of fprintf.
This commit is contained in:
parent
7c2683c40f
commit
66be918f5f
|
@ -1,3 +1,7 @@
|
||||||
|
2016-11-17 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* c-exp.y (c_print_token): Use parser_fprintf instead of fprintf.
|
||||||
|
|
||||||
2016-11-17 Pedro Alves <palves@redhat.com>
|
2016-11-17 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* ctf.c [USE_WIN32API] (mkdir): Delete.
|
* ctf.c [USE_WIN32API] (mkdir): Delete.
|
||||||
|
|
12
gdb/c-exp.y
12
gdb/c-exp.y
|
@ -3215,7 +3215,7 @@ c_print_token (FILE *file, int type, YYSTYPE value)
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case INT:
|
case INT:
|
||||||
fprintf (file, "typed_val_int<%s, %s>",
|
parser_fprintf (file, "typed_val_int<%s, %s>",
|
||||||
TYPE_SAFE_NAME (value.typed_val_int.type),
|
TYPE_SAFE_NAME (value.typed_val_int.type),
|
||||||
pulongest (value.typed_val_int.val));
|
pulongest (value.typed_val_int.val));
|
||||||
break;
|
break;
|
||||||
|
@ -3228,17 +3228,17 @@ c_print_token (FILE *file, int type, YYSTYPE value)
|
||||||
memcpy (copy, value.tsval.ptr, value.tsval.length);
|
memcpy (copy, value.tsval.ptr, value.tsval.length);
|
||||||
copy[value.tsval.length] = '\0';
|
copy[value.tsval.length] = '\0';
|
||||||
|
|
||||||
fprintf (file, "tsval<type=%d, %s>", value.tsval.type, copy);
|
parser_fprintf (file, "tsval<type=%d, %s>", value.tsval.type, copy);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSSTRING:
|
case NSSTRING:
|
||||||
case VARIABLE:
|
case VARIABLE:
|
||||||
fprintf (file, "sval<%s>", copy_name (value.sval));
|
parser_fprintf (file, "sval<%s>", copy_name (value.sval));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPENAME:
|
case TYPENAME:
|
||||||
fprintf (file, "tsym<type=%s, name=%s>",
|
parser_fprintf (file, "tsym<type=%s, name=%s>",
|
||||||
TYPE_SAFE_NAME (value.tsym.type),
|
TYPE_SAFE_NAME (value.tsym.type),
|
||||||
copy_name (value.tsym.stoken));
|
copy_name (value.tsym.stoken));
|
||||||
break;
|
break;
|
||||||
|
@ -3247,7 +3247,7 @@ c_print_token (FILE *file, int type, YYSTYPE value)
|
||||||
case UNKNOWN_CPP_NAME:
|
case UNKNOWN_CPP_NAME:
|
||||||
case NAME_OR_INT:
|
case NAME_OR_INT:
|
||||||
case BLOCKNAME:
|
case BLOCKNAME:
|
||||||
fprintf (file, "ssym<name=%s, sym=%s, field_of_this=%d>",
|
parser_fprintf (file, "ssym<name=%s, sym=%s, field_of_this=%d>",
|
||||||
copy_name (value.ssym.stoken),
|
copy_name (value.ssym.stoken),
|
||||||
(value.ssym.sym.symbol == NULL
|
(value.ssym.sym.symbol == NULL
|
||||||
? "(null)" : SYMBOL_PRINT_NAME (value.ssym.sym.symbol)),
|
? "(null)" : SYMBOL_PRINT_NAME (value.ssym.sym.symbol)),
|
||||||
|
@ -3255,7 +3255,7 @@ c_print_token (FILE *file, int type, YYSTYPE value)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FILENAME:
|
case FILENAME:
|
||||||
fprintf (file, "bval<%s>", host_address_to_string (value.bval));
|
parser_fprintf (file, "bval<%s>", host_address_to_string (value.bval));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue