--- Comment #5 from l_belev at yahoo dot com 2007-08-29 13:35 ---
Tested this in 4.2.1 and int seems to be fixed (i.e. the compiler now does not
make difference between the 2 variants ot the code)
Thank you!
--
l_belev at yahoo dot com changed:
What|Removed
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567
Bug #: 52567
Summary: constant expression not recognized as being constant
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567
--- Comment #3 from Luchezar Belev 2012-03-12
20:56:10 UTC ---
It overflows alright, but what this has to do with not being constant?
An overflow in a constant expression makes it variable? I fail to see the logic
here
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567
--- Comment #5 from Luchezar Belev 2012-03-12
21:08:07 UTC ---
Ok, but at least the error message should be changed to tell about overflow.
For example the following code gives error too, but it says
"error: overflow in constant expression"
whic
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: l_belev at yahoo dot com
Target Milestone: ---
here is c code that demonstrates the problem:
double x;
unsigned n;
void foo() {
while (n > 8) {
n -
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: l_belev at yahoo dot com
consider this simple function:
int is_float_negative(int x) { return (int)(x ^ 0x8000) > 0; }
for x86, with options "-O3 -march=core2&quo
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60554
--- Comment #1 from Luchezar Belev ---
since all (x^0x8000), (x+0x8000) and (x-0x8000) are equivalend in
this case, if GCC had used the subtraction (instead of the addition) it could
optimize the code even further by considering the fa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60554
--- Comment #2 from Luchezar Belev ---
sorry, the above code to be correct "setg %al" should be "seta %al" instead.
also in the compiler-generated code, the testl instruction is still redundant,
but when it is removed the following "setg %al" sho
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: l_belev at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19912
--- Additional Comments From l_belev at yahoo dot com 2005-02-11 23:09
---
(In reply to comment #1)
> Note that the first expression can involve undefined behavior when the
> second doesn't, so transformations between these forms would be invalid
> with -ftrapv and
10 matches
Mail list logo