* [Bug c/24542] integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
@ 2005-10-26 15:01 ` alexey at hyperroll dot com
2005-10-26 15:03 ` alexey at hyperroll dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: alexey at hyperroll dot com @ 2005-10-26 15:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from alexey at hyperroll dot com 2005-10-26 15:01 -------
I'm not familiar with the parse tree, so I could do only a partial patch
(assignment, not initialization). The example file, original and patched source
files archived and attached.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/24542] integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
2005-10-26 15:01 ` [Bug c/24542] " alexey at hyperroll dot com
@ 2005-10-26 15:03 ` alexey at hyperroll dot com
2005-10-26 15:59 ` [Bug c/24542] potential " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: alexey at hyperroll dot com @ 2005-10-26 15:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from alexey at hyperroll dot com 2005-10-26 15:03 -------
Created an attachment (id=10062)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10062&action=view)
example of code to warn, proposed partial patch
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/24542] potential integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
2005-10-26 15:01 ` [Bug c/24542] " alexey at hyperroll dot com
2005-10-26 15:03 ` alexey at hyperroll dot com
@ 2005-10-26 15:59 ` pinskia at gcc dot gnu dot org
2005-10-26 16:00 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-26 15:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-10-26 15:59 -------
You should be patching the mainline as the C parser has changed to a non bison
based parser.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/24542] potential integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
` (2 preceding siblings ...)
2005-10-26 15:59 ` [Bug c/24542] potential " pinskia at gcc dot gnu dot org
@ 2005-10-26 16:00 ` pinskia at gcc dot gnu dot org
2005-10-26 17:12 ` alexey at hyperroll dot com
` (5 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-26 16:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-10-26 16:00 -------
Please also make the warning conditional based on an option and make the
option.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/24542] potential integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
` (3 preceding siblings ...)
2005-10-26 16:00 ` pinskia at gcc dot gnu dot org
@ 2005-10-26 17:12 ` alexey at hyperroll dot com
2005-11-01 22:29 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: alexey at hyperroll dot com @ 2005-10-26 17:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from alexey at hyperroll dot com 2005-10-26 17:12 -------
Sir, it's my first report here, and I see the code first time. I hope that both
comments #3 and #4 are not for me. Or am I mistaken?
Otherwise, what document (preferably, short) should I read to understand the
ideology of the parse tree, and its details.
Also, why have I done the parser non-bison compatible? I've taken the stable
release, not the CVS revision.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/24542] potential integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
` (4 preceding siblings ...)
2005-10-26 17:12 ` alexey at hyperroll dot com
@ 2005-11-01 22:29 ` pinskia at gcc dot gnu dot org
2006-03-13 21:49 ` alexey at hyperroll dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-01 22:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-11-01 22:29 -------
(In reply to comment #5)
> Sir, it's my first report here, and I see the code first time. I hope that both
> comments #3 and #4 are not for me. Or am I mistaken?
They were the person who was written the code.
> Otherwise, what document (preferably, short) should I read to understand the
> ideology of the parse tree, and its details.
> Also, why have I done the parser non-bison compatible? I've taken the stable
> release, not the CVS revision.
The fix you are proposing would go on the mainline first (well in this case it
would only go on the mainline). And since the mainline (CVS/SVN trunk) is
using a non bison parser, you would have to change your code to deal with that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/24542] potential integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
` (5 preceding siblings ...)
2005-11-01 22:29 ` pinskia at gcc dot gnu dot org
@ 2006-03-13 21:49 ` alexey at hyperroll dot com
2006-03-13 21:52 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: alexey at hyperroll dot com @ 2006-03-13 21:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from alexey at hyperroll dot com 2006-03-13 21:49 -------
(In reply to comment #6)
So, who is actually going to fix the issue?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/24542] potential integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
` (6 preceding siblings ...)
2006-03-13 21:49 ` alexey at hyperroll dot com
@ 2006-03-13 21:52 ` pinskia at gcc dot gnu dot org
2006-09-18 0:18 ` pinskia at gcc dot gnu dot org
2006-09-18 5:48 ` alexey at hyperroll dot com
9 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-13 21:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2006-03-13 21:52 -------
(In reply to comment #7)
> So, who is actually going to fix the issue?
If you want it fixed, you should update it to the mainline and then post the
patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/24542] potential integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
` (7 preceding siblings ...)
2006-03-13 21:52 ` pinskia at gcc dot gnu dot org
@ 2006-09-18 0:18 ` pinskia at gcc dot gnu dot org
2006-09-18 5:48 ` alexey at hyperroll dot com
9 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-18 0:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2006-09-18 00:18 -------
We should never warn on multiply because it is just too crazy to. This is what
debugging is about, debug your program for mistakes like this.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/24542] potential integer overflow should be warned on assignment to wider variable
2005-10-26 14:54 [Bug c/24542] New: integer overflow should be warned on assignment to wider variable alexey at hyperroll dot com
` (8 preceding siblings ...)
2006-09-18 0:18 ` pinskia at gcc dot gnu dot org
@ 2006-09-18 5:48 ` alexey at hyperroll dot com
9 siblings, 0 replies; 13+ messages in thread
From: alexey at hyperroll dot com @ 2006-09-18 5:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from alexey at hyperroll dot com 2006-09-18 05:48 -------
(In reply to comment #9)
> We should never warn on multiply because it is just too crazy to. This is what
> debugging is about, debug your program for mistakes like this.
The citation may be used to eliminate every warning any compiler produces:
"just debug, why bother? Ain't you a programmer?" I've tried to specify a
warning that comes for developers when they do a scaling of their applications
for a larger input data, and just do not see when the overflowing happens.
So, you're free to reject the issue, but the reason you've given... Personally,
I do not accept it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24542
^ permalink raw reply [flat|nested] 13+ messages in thread