https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107931
--- Comment #5 from Tomasz Konojacki ---
To sum this thread up, there are undocumented rules that can cause a
semantically identical program to be rejected by the compiler under certain
optimisation levels (with an uninformative error message) a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107931
--- Comment #1 from Tomasz Konojacki ---
(In reply to Tomasz Konojacki from comment #0)
> The error below occurs only with -Od.
Sorry, -Og.
PS. It seems that moving the definition of fun4 to the first line
makes the error disappear.
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: me at xenu dot pl
Target Milestone: ---
The error below occurs only with -Od. The code is accepted if one of
-O0, -O1, -O2, -O3 or -Os is used instead.
This happens with GCC 12.1 and 12.2, it doesn't with 11.3.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: me at xenu dot pl
Target Milestone: ---
The following code:
int foo() {
int aaa = 1;
unsigned char bbb = 0;
bbb |= aaa ? 1 : 0;
return bbb;
}
Gives this warning:
: In function 'foo':
:4:12: warning:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53277
--- Comment #18 from Tomasz Konojacki ---
Sorry, it still warns in C mode, but it doesn't in C++.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93652
Tomasz Konojacki changed:
What|Removed |Added
CC||me at xenu dot pl
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53277
Tomasz Konojacki changed:
What|Removed |Added
CC||me at xenu dot pl
--- Comment #17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38522
Tomasz Konojacki changed:
What|Removed |Added
CC||me at xenu dot pl
--- Comment #10
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69616
Tomasz Konojacki changed:
What|Removed |Added
CC||me at xenu dot pl
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66152
Tomasz Konojacki changed:
What|Removed |Added
CC||me at xenu dot pl
--- Comment #3
10 matches
Mail list logo