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