On 2/7/21 5:06 AM, Ralph Lange via Core-talk wrote:
> Dear all,
>
> On Travis builds (trusty, gcc 4.8.4) I recently started seeing
>
> Building dependency BASE in /home/travis/.cache/base-7.0
> 580In file included from ../osi/os/Linux/osdNetIntf.c:1:0:
> 581./../osi/osdNetIfAddrs.c: In function ‘osiSockDiscoverBroadcastAddresses’:
> 582./../osi/osdNetIfAddrs.c:63:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
> 583for ( struct ifaddrs *ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next ) {
> 584^
> 585./../osi/osdNetIfAddrs.c:63:5: note: use option -std=c99 or -std=gnu99 to compile your code
> 586In file included from ../osi/os/Linux/osdNetIntf.c:1:0:
> 587./../osi/osdNetIfAddrs.c: In function ‘osiLocalAddrOnce’:
> 588./../osi/osdNetIfAddrs.c:175:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
> 589for ( struct ifaddrs *ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next ) {
> 590^
> 591make[4]: *** [osdNetIntf.o] Error 1
> 592
>
>
>
>
> Should we switch on C99 explicitly for Gnu C compilers?
We should investigate why the gcc-4.8 github actions builds aren't actually using gcc 4.8.
What I see is they are installing 4.8.5 (already slightly different from the one in the Travis builders). Not sure if that explains the difference.
But I agree: our CI builds should have caught that.