public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11657] New: erroneous syntax of extern static const array reference
@ 2003-07-24  7:16 oyvind dot teig at start dot no
  2003-07-24 11:27 ` [Bug c/11657] " pinskia at physics dot uc dot edu
  2003-07-27 14:59 ` pinskia at physics dot uc dot edu
  0 siblings, 2 replies; 3+ messages in thread
From: oyvind dot teig at start dot no @ 2003-07-24  7:16 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2292 bytes --]

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11657

           Summary: erroneous syntax of extern static const array reference
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: oyvind dot teig at start dot no
                CC: gcc-bugs at gcc dot gnu dot org

-- First the log

In file included from PROT_ASSP.c:56:
PROT_ASSP.h:32: warning: `ASSP_z_Num' initialized and declared `extern'
PROT_ASSP.c:62: error: redefinition of `ASSP_z_Num'
PROT_ASSP.h:32: error: `ASSP_z_Num' previously defined here
PROT_ASSP.c:62: internal compiler error: tree check: expected function_decl, 
have var_decl in pushde
cl, at gcc/c-decl.c:2272
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make.exe: *** [PROT_ASSP.o] Error 1

-- The version:

avr-gcc (GCC) 3.2 20020616 (experimental)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-- The error:

In "PROT_ASSP.h" I obviously erroneously referenced an array like this:

  extern const word8_a ASSP_z_Num [] = {};

In the "PROT_ASSP.c" I have declared this array:

  static const word8_a ASSP_z_Num [] =
      {
          2, // ASSP_ANSWER_TIME_OR_IDLE_CURRENT_WANTED_a
          2, // ASSP_RELAY_AND_BEEP_a
          2, // ASSP_READ_DETECTOR_STATUS_a
          2, // ASSP_READ_CODE_a
          2, // ASSP_READ_TOTAL_STATUS_a
          2, // ASSP_RESET_a
          2, // ASSP_RETRANSMIT_LAST_ANSWER_a
          2, // ASSP_SIMULATE_ANSWER_a
          2, // ASSP_WRITE_DETECTOR_STATUS_a
          2, // ASSP_IO_a
          2  // ASSP_RESYNCH_a
    };

word8_a is:

  typedef unsigned char word8_a;

-- I'll now have to find out how to do it correctly!

--
/ Øyvind Teig
\ Autronica Fire and Security (AFS) - a Kidde Company
/ 7483 Trondheim Norway - Tel: 47 73 58 24 68 
\ http://www.autronicafire.no - Company
/ http://home.no.net/oyvteig - Private


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

* [Bug c/11657] erroneous syntax of extern static const array reference
  2003-07-24  7:16 [Bug c/11657] New: erroneous syntax of extern static const array reference oyvind dot teig at start dot no
@ 2003-07-24 11:27 ` pinskia at physics dot uc dot edu
  2003-07-27 14:59 ` pinskia at physics dot uc dot edu
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-24 11:27 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11657


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-24 11:27 -------
I cannot reproduce this ICE with 3.2.3, 3.3.1 (20030707), or the mainline (20030723) with 
the information given.

Can you provide the preprocessed source file after reading http://gcc.gnu.org/bugs.html?

Also you are using an experimental version of gcc which is over a year old can you try a 
newer version?


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

* [Bug c/11657] erroneous syntax of extern static const array reference
  2003-07-24  7:16 [Bug c/11657] New: erroneous syntax of extern static const array reference oyvind dot teig at start dot no
  2003-07-24 11:27 ` [Bug c/11657] " pinskia at physics dot uc dot edu
@ 2003-07-27 14:59 ` pinskia at physics dot uc dot edu
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-27 14:59 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11657


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
           Keywords|                            |ice-on-invalid-code
         Resolution|                            |FIXED


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-27 14:59 -------
I can reproduce this in 3.3.1 (20030714) but on the mainline (20030720), it is already 
fixed. Since this bug is ice-on-invalid-code and we are not fixing ice-on-invalid-code for 
3.3.x, I am closing this as fixed.


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

end of thread, other threads:[~2003-07-27 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-24  7:16 [Bug c/11657] New: erroneous syntax of extern static const array reference oyvind dot teig at start dot no
2003-07-24 11:27 ` [Bug c/11657] " pinskia at physics dot uc dot edu
2003-07-27 14:59 ` pinskia at physics dot uc dot edu

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).