RFR: JDK-8224028: loop initial declarations introduced by JDK-8184770 (jdwp)

David Holmes david.holmes at oracle.com
Fri May 17 00:19:05 UTC 2019


On 17/05/2019 9:14 am, Martin Buchholz wrote:
> On Thu, May 16, 2019 at 4:05 PM David Holmes <david.holmes at oracle.com 
> <mailto:david.holmes at oracle.com>> wrote:
> 
>     On 17/05/2019 8:57 am, Martin Buchholz wrote:
>      > Maybe you just need to ask gcc to use a more modern -std=...
>      > It might reasonably be defaulting to gnu89
>      >
>     https://stackoverflow.com/questions/14737104/what-is-the-default-c-mode-for-the-current-gcc-especially-on-ubuntu
> 
>     Yes, but I thought we'd already done this dance. Solaris was setting a
>     flag to use C89 IIRC and we removed it.
> 
> 
> A flag to use C89 is obviously bad if you're using features from a later 
> standard.
> I was suggesting that you could pass gcc -std=gnu99 or -std= c99 (I 
> would go whole hog to C11)

Again I thought we had done this dance. We set -std=gnu++98 but that 
only affects .cpp files. We need a similar thing for .c files. I know 
this has been discussed so I'll see if I can dig up the history and find 
out why we didn't do it. I'll file a build bug if needed.

Cheers,
David


>   $ gcc -v --help |& grep std=.*' C '
>    -std=c11                    Conform to the ISO 2011 C standard
>    -std=c89                    Conform to the ISO 1990 C standard
>    -std=c90                    Conform to the ISO 1990 C standard
>    -std=c99                    Conform to the ISO 1999 C standard
>    -std=gnu11                  Conform to the ISO 2011 C standard with GNU
>    -std=gnu89                  Conform to the ISO 1990 C standard with GNU
>    -std=gnu90                  Conform to the ISO 1990 C standard with GNU
>    -std=gnu99                  Conform to the ISO 1999 C standard with GNU
>    -std=iso9899:1990           Conform to the ISO 1990 C standard
>    -std=iso9899:199409         Conform to the ISO 1990 C standard as 
> amended in
>    -std=iso9899:1999           Conform to the ISO 1999 C standard
>    -std=iso9899:2011           Conform to the ISO 2011 C standard


More information about the serviceability-dev mailing list