SDCC-SDCC missing header file error returns 0 (success)

charon00
2013-07-11
2013-07-30
  • charon00
    charon00
    2013-07-11

    I'm using SDCC (sdcc-sdcc) on a Linux 64-bit platform to compile C source code for the MCS51 architecture. I noticed that if I include a header file in the source but it is missing from the project, an error will print out to the terminal, but the error code returned by the compiler is 0 (generally a success code) so utilities such as make don't recognize the error.

    I was going to file a bug report but I wanted to ask here, is this expected behavior or should the compiler be returning a non-zero code for a missing header file? My project uses a custom library so I'm going to try to put together a simpler project to demonstrate this behavior, and I'll post the results here.

    EDIT: The attached "sdcc_bug.zip" provides a source file (main.c), Makefile, and README on how to use the archive to demonstrate this problem.

     
    Last edit: charon00 2013-07-11
    Attachments
  • Brian Ruthven
    Brian Ruthven
    2013-07-30

    As it happens, I did log a bug on this problem:
    https://sourceforge.net/p/sdcc/bugs/2194/
    It's now apparently be fixed in revision #8784 (although I haven't tested it for myself).