Menu

#3823 SDCDB source not valid C23

closed-fixed
None
other
5
2025-08-08
2025-01-22
No

I've tried compiling SDCC as C23, to prepare for GCC 15 making C23 the default.

Despite using "make -k ", I can't progress beyond failing attempts to compile sdcdb and asxxxx. The latter is probably something to look into after merging current upstream asxxxx into our fork.

For sdcdb, we fail at

sdcdb.h:63:15: error: both ‘short’ and ‘_Bool’ in declaration specifiers
   63 | typedef short bool;

I don't think we need sdcdb to be able to compile with pre-C99 compilers, so we after checking that two values are enough for bool, we could just use #include <stdbool.h> and remove the typedef?

Related

Bugs: #3846
Wiki: NGI0-Commons-SDCC

Discussion

  • Philipp Klaus Krause

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,3 +8,5 @@
     sdcdb.h:63:15: error: both ‘short’ and ‘_Bool’ in declaration specifiers
        63 | typedef short bool;
     ~~~~
    +
    +I don&#39;t think we need sdcdb to be able to compile with pre-C99 compilers, so we after checking  that two values are enough for bool, we could just use #include stdbool.h&gt; and remove the typedef?
    
     
  • Philipp Klaus Krause

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -9,4 +9,4 @@
        63 | typedef short bool;
     ~~~~
    
    -I don&#39;t think we need sdcdb to be able to compile with pre-C99 compilers, so we after checking  that two values are enough for bool, we could just use #include stdbool.h&gt; and remove the typedef?
    +I don&#39;t think we need sdcdb to be able to compile with pre-C99 compilers, so we after checking  that two values are enough for bool, we could just use #include &lt;stdbool.h&gt; and remove the typedef?
    
     
  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    Fixed in [r15567].

     

    Related

    Commit: [r15567]


Log in to post a comment.

MongoDB Logo MongoDB