[Bug bootstrap/14465] New: [3.4 Regression] insn-output.c:790: error: `asm_out_file' undeclared
danglin at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Mar 6 23:34:00 GMT 2004
The following error occurs in stage2:
stage1/xgcc -Bstage1/ -B/opt/gnu/gcc/gcc-3.4.0/hppa2.0w-hp-hpux11.00/bin/ -g -
O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-pedantic -Wno-long-long -Wold-style-definition -DHAVE_CONFIG_H -I. -I. -
I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -c insn-output.c \
-o insn-output.o
insn-output.c: In function `output_188':
insn-output.c:790: error: `asm_out_file' undeclared (first use in this function)
insn-output.c:790: error: (Each undeclared identifier is reported only once
insn-output.c:790: error: for each function it appears in.)
insn-output.c: In function `output_189':
insn-output.c:801: error: `asm_out_file' undeclared (first use in this function)
Looking at the preproccessed source for insn-output.c, I see the following:
# 385 "../../gcc/gcc/output.h"
extern FILE *asm_out_file;
...
static const char *
output_44 (rtx *operands __attribute__ ((__unused__)), rtx insn __attribute__ ((
__unused__)))
{
{
rtx xoperands[3];
extern FILE *asm_out_file;
...
static const char *
output_45 (rtx *operands __attribute__ ((__unused__)), rtx insn __attribute__ ((
__unused__)))
{
{
rtx xoperands[3];
extern FILE *asm_out_file;
...
static const char *
output_188 (rtx *operands __attribute__ ((__unused__)), rtx insn __attribute__ (
(__unused__)))
{
{
output_asm_insn ("bl .+8,%0\n\tdepi 0,31,2,%0", operands);
(*targetm.asm_out.internal_label) (asm_out_file, "L",
(((operands[1])->u.fld[6]).rtint));
return "";
}
}
...
If I remove the declations of asm_out_file from output_44 and output_45,
the file compiles. These declarations appear to be reminants from an
earlier time when output.h was not included.
It seems a declaration in an inner scope now causes an earlier declaration
at file scope to be forgotten.
--
Summary: [3.4 Regression] insn-output.c:790: error:
`asm_out_file' undeclared
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danglin at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: hppa2.0w-hp-hpux11.00
GCC host triplet: hppa2.0w-hp-hpux11.00
GCC target triplet: hppa2.0w-hp-hpux11.00
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14465
More information about the Gcc-bugs
mailing list