[Bug c/31166] Integer hex constant does not follow promoting rules

2007-03-17 Thread roberto dot gordo at gmail dot com
--- Comment #9 from roberto dot gordo at gmail dot com 2007-03-17 17:58 --- I would like to apologize for my faults in gcc bug report 31166, specially to the people who responded, and fully acknowledge my error. I've misunderstood your responses. Now, while reading them again,

[Bug c/31166] Integer hex constant does not follow promoting rules

2007-03-14 Thread roberto dot gordo at gmail dot com
--- Comment #8 from roberto dot gordo at gmail dot com 2007-03-14 12:29 --- I'm still unable to match the behavior of gcc with the ISO C standard. I will try to explain myself. The reason for which gcc produces different results with hex constants is now clear. Also, in the foll

[Bug c/31166] Integer hex constant does not follow promoting rules

2007-03-14 Thread roberto dot gordo at gmail dot com
--- Comment #7 from roberto dot gordo at gmail dot com 2007-03-14 09:40 --- That's OK, it is not a bug, sorry. -- roberto dot gordo at gmail dot com changed: What|Removed |

[Bug c/31166] Integer hex constant does not follow promoting rules

2007-03-14 Thread roberto dot gordo at gmail dot com
--- Comment #6 from roberto dot gordo at gmail dot com 2007-03-14 09:27 --- I think I've found something. According to the ISO C standard, a decimal constant without suffixes should ALWAYS be signed int (or signed long long if it does not fit), but never be unsigned! An oct

[Bug c/31166] Integer hex constant does not follow promoting rules

2007-03-14 Thread roberto dot gordo at gmail dot com
--- Comment #5 from roberto dot gordo at gmail dot com 2007-03-14 08:52 --- > unsigned is never promoted, it always stays unsigned. Sorry to insist, but I'm still not convinced. Please, see these examples, compiled with -std=c99. { unsigned u; int i; u = 1; /* th

[Bug c/31166] Integer hex constant does not follow promoting rules

2007-03-13 Thread roberto dot gordo at gmail dot com
--- Comment #2 from roberto dot gordo at gmail dot com 2007-03-13 22:27 --- I do not agree at all. Please, read. So 0x8000 is unsigned because does not fit on an int type. That's OK. If negating it gives an unsigned int of the same value, then, how do you explain tha

[Bug c/31166] New: Integer hex constant does not follow promoting rules

2007-03-13 Thread roberto dot gordo at gmail dot com
- Summary: Integer hex constant does not follow promoting rules Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org Rep