#2147 Incorrect error message

open
nobody
None
PIC14
5
2013-05-25
2013-03-29
No

Incorrect error message

$ sdcc --Werror -pp16f877a --opt-code-size -Ilibmain -DF_CPU=4000000 -mpic14 --use-non-free bug1.c
bug1.c:5: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/pic14/glue.c' line number '760' : !list || (list->type == INIT_NODE)
Contact Author with source code
$ sdcc -v
SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.2.0 #8008 (Jul 6 2012) (Linux)

1 Attachments

Discussion

  • BsAtHome
    BsAtHome
    2013-03-29

    The compiler should not have generated an internal error, but your code does not compile either way.

    You are trying to assign an array to a scalar, which will not work. My guess is that you were trying to write the following:
    uint8_t arr[] = { 6, 9, 8, 7, 6, };
    but forgot to add the [].

     
  • Absolutely. I believe that the compiler must report a syntax error.