If you compile the code below into the gcc -Wall
/-Waddress
option,
warning: the address of ‘i’ will always evaluate as ‘true’ [-Waddress]
It appears.
I don't know why it's coming up. I don't know what it means Is there anyone who can explain?
#include <stdio.h>
volatile int i;
int main()
{
int c;
for (i = 0; i < 3; i++)
{
c = i &&& i;
printf("%d\n", c);
}
return 0;
}
The address value of However, if the unary operator It's not a good idea to use multiple operators
It's better not to write like that
c = i&&&i;
= c = i&&i. p>
i
is always true
address of 'i' will always evaluate as 'true'
warning.&
is overloaded from the user-defined type (if & is not an address value)
You can produce different results.
© 2024 OneMinuteCode. All rights reserved.