From: SourceForge.net <no...@so...> - 2011-09-12 20:07:29
|
Bugs item #3398626, was opened at 2011-08-26 14:58 Message generated for change (Comment added) made by borutr You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3398626&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: C-Front End Group: unreproducable Status: Open Resolution: Works For Me Priority: 5 Private: No Submitted By: Scott Grodevant (scott14414) Assigned to: Borut Ražem (borutr) Summary: incorrect error messages Initial Comment: The declaration: "extern __code char * _code channels[ 8 ];" in a header file caues the compiler to generate a bogus error: Invoking project defined compiler. c:\SDCC\BIN\SDCC.EXE -c --debug --use-stdout -V --model-large --iram-size 256 --xram-size 8192 -I"D:\Lucid\TestEqip\03997\soft\Hardware Checkout" "D:\Lucid\TestEqip\03997\soft\Hardware Checkout\hello.c" + c:\SDCC\BIN\sdcpp.exe -nostdinc -Wall -I"D:\Lucid\TestEqip\03997\soft\Hardware Checkout" -obj-ext=.rel -DSDCC_MODEL_LARGE -DSDCC_FLOAT_REENT -DSDCC=300 -DSDCC_REVISION=6037 -DSDCC_mcs51 -D__mcs51 -isystem "c:\SDCC\BIN\..\include\mcs51" -isystem "c:\SDCC\BIN\..\include" "D:\Lucid\TestEqip\03997\soft\Hardware Checkout\hello.c" sdcpp.exe: fatal error: when writing output to : No such file or directory D:\Lucid\TestEqip\03997\soft\Hardware Checkout\/adc.h:3: syntax error: token -> 'channels' ; column 35 The original problem is that there's an underscore missing from the second code declaration. ---------------------------------------------------------------------- >Comment By: Borut Ražem (borutr) Date: 2011-09-12 22:07 Message: No, in may case it doesn't hang: N:\tmp\cpp>sdcc -c --debug --use-stdout -V --model-large --iram-size 256 --xram- size 8192 -I"D:\Lucid\TestEqip\03997\soft\Hardware Checkout" t.c + C:\PROGRA~1\SDCC\bin\sdcpp.exe -nostdinc -Wall -ID:\\Lucid\\TestEqip\\03997\\s oft\\Hardware" "Checkout -obj-ext=.rel -DSDCC_MODEL_LARGE -DSDCC_FLOAT_REENT -DS DCC=304 -DSDCC_REVISION=6849 -DSDCC_mcs51 -D__mcs51 -isystem "C:\Program Files\S DCC\bin\..\include\mcs51" -isystem "C:\Program Files\SDCC\bin\..\include" "t.c" adc.h:3: syntax error: token -> 'channels' ; column 35 N:\tmp\cpp> The content of t.c is: ----8<---- #include "adc.h" int main() { return 0; } ---->8---- Try to compile it from the current directory, in you case from "D:\Lucid\TestEqip\03997\soft\Hardware Checkout". Try to move both adc.h and t.c to a directory on disk C: and try to compile them from the command line. Let me know about the results. Borut ---------------------------------------------------------------------- Comment By: Scott Grodevant (scott14414) Date: 2011-09-12 21:36 Message: I just installed build 6849. I am running SDCC via SiLabs IDE (3.80.00). When presented with good souce code, it compiles fine. When I remove one of the double underscores from any of the __code keywords, it hangs. A dialog "Preparing code for d..." is displayed, which never disappears. If I terminate the process using task manager to terminate SDCC, then fix the code, it again compiles. If I run SDCC from a command prompt, I do get the same sort of message you show below, but SDCC doesn't terminate, it remains active. Did you notice that SDCC doesn't terminate? Thanks, Scott ---------------------------------------------------------------------- Comment By: Borut Ražem (borutr) Date: 2011-09-11 18:55 Message: I tried to reproduce it with: sdcc --version SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.4 #6848 (Sep 10 2011) (MINGW32) but I get only the second error message: adc.h:3: syntax error: token -> 'channels' ; column 35 which is OK. Scott, can you please re-verify if it is still reproducible in build #6848 or newer? Borut ---------------------------------------------------------------------- Comment By: Scott Grodevant (scott14414) Date: 2011-08-30 18:15 Message: The incorrect formatting of the command line is a direct result of the error in the code (e.g. the missing underscore). That's the bug I'm talking about. The syntax error was close enough to lead me to the problem, but the fatal error writing output seems a totally unrelated consequence of the code formatting problem. ---------------------------------------------------------------------- Comment By: Raphael Neider (tecodev) Date: 2011-08-26 18:06 Message: Well, extern __code char * _code[8]; would be a perfectly valid, legal declaration of an array named _code. The syntax error message is correct in that the token channels after the identifier _code cannot complete a valid element of the C language. While we could try to make the error message more helpful (request for enhancement / feature request), this is not a bug. The first message from sdcpp worries me: Is this caused by the blank in the pathname? Or is sdcpp trying something strange here? The blank between "to" and ":" seems to suggest an empty output filename?!? Anyways, since you are reporting a different problem and since sdcc seems to have gotten back some output from sdcpp, we will ignore this for now ;-) I set this item to pending so that it close automatically unless someone responds within the next few days. Best regards Raphael ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3398626&group_id=599 |