bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: byteswap.h behavior


From: Collin Funk
Subject: Re: byteswap.h behavior
Date: Sun, 12 May 2024 13:11:37 -0700
User-agent: Mozilla Thunderbird

On 5/12/24 1:02 PM, Bruno Haible wrote:
> The simple fix to your worry is: Let the user use '-Wall' routinely.
> gcc has a warning option '-Wsequence-point', included in '-Wall'.
> clang has a warning option '-Wunsequenced', included in '-Wall'.
> The do the job, and I have not seen them produce false warnings ever.
> 
> $ gcc -Wall foo.c
> foo.c: In function ‘main’:
> foo.c:15:59: warning: operation on ‘value_macro’ may be undefined 
> [-Wsequence-point]
>    15 |   printf ("2. %#" PRIX32 "\n", bswap_32_macro (value_macro++));
>       |                                                           ^

Oh, I completely forgot about this warning. It is very rare that I
write something that angers it. That alleviates my worry since those
messages are hard to miss. Thanks.

Collin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]