Re: [hatari-devel] Some findings

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 03/09/2018 à 08:24, Thomas Huth a écrit :
On 2018-09-02 21:49, Troed Sångberg wrote:
I left for the airport right after I saw it, it caused my automated mac
build to fail. Maybe already fixed, otherwise the build log should have
been published.

Looks like your build simply failed to pick up the new file (scc.c)
again... I guess the build files need to be regenerated properly there?

Hi

Can't tell the reason for Troed's build , but I fixed a "for loop" in nc5380.c that required c11 or c99 options in gcc :

src/ncr5380.c:309:5: erreur: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for (int i = 0; i < 8; i++) {
     ^
src/ncr5380.c:309:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code

gcc 4.9.2 is reporting this error, but the most recent gcc 8 doesn't report it anymore.

Since we want to keep C compatibility with older compilers, maybe we should explicitely add options to Cmake in order to report this also with more recent gcc ? Using the -std=option (but I don't know the equivalent that was used in gcc 4.9) ; else the compilation issue might go unnoticed as I guess most of us are compiling with recent gcc version.

Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/