This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Tue, May 27, 2008 at 11:56 AM, Andriy Gapon <avg@icyb.net.ua> wrote:Thank you for the explanation! I didn't realize the difference.
OTOH, do you think that those arithmetic warnings are practical (as opposed to being correct)?
I think so as the short int case has a defined overflow of the signed short type that is SHRT_MAX + 1 is defined while INT_MAX + 1 is not.
I still feel like disagreeing. Consider this: ************* int main() { short short_x;
short_x = short_x + 1;
short_x += 1;
short_x++;
++short_x;return 0; } *************
-- Andriy Gapon
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |