public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/14465] New: [3.4 Regression] insn-output.c:790: error: `asm_out_file' undeclared
@ 2004-03-06 23:34 danglin at gcc dot gnu dot org
  2004-03-06 23:40 ` [Bug c/14465] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2004-03-06 23:34 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-03-07  0:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-06 23:34 [Bug bootstrap/14465] New: [3.4 Regression] insn-output.c:790: error: `asm_out_file' undeclared danglin at gcc dot gnu dot org
2004-03-06 23:40 ` [Bug c/14465] " pinskia at gcc dot gnu dot org
2004-03-06 23:46 ` pinskia at gcc dot gnu dot org
2004-03-07  0:00 ` dave at hiauly1 dot hia dot nrc dot ca
2004-03-07  0:01 ` ebotcazou at gcc dot gnu dot org
2004-03-07  0:33 ` cvs-commit at gcc dot gnu dot org
2004-03-07  0:39 ` cvs-commit at gcc dot gnu dot org
2004-03-07  0:41 ` ebotcazou at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).