public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28656] duplicated null argument warning on memcpy()
[not found] <bug-28656-4@http.gcc.gnu.org/bugzilla/>
@ 2012-07-19 13:12 ` jakub at gcc dot gnu.org
2012-07-20 9:37 ` jakub at gcc dot gnu.org
2012-08-22 20:45 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-07-19 13:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28656
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-07-19 13:12:15 UTC ---
Created attachment 27833
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27833
gcc48-pr28656.patch
Untested fix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/28656] duplicated null argument warning on memcpy()
[not found] <bug-28656-4@http.gcc.gnu.org/bugzilla/>
2012-07-19 13:12 ` [Bug c++/28656] duplicated null argument warning on memcpy() jakub at gcc dot gnu.org
@ 2012-07-20 9:37 ` jakub at gcc dot gnu.org
2012-08-22 20:45 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-07-20 9:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28656
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-07-20 09:37:29 UTC ---
Author: jakub
Date: Fri Jul 20 09:37:25 2012
New Revision: 189707
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189707
Log:
PR c++/28656
* tree-vrp.c (nonnull_arg_p): Handle all nonnull attributes instead
of just the first one.
* c-common.c (check_function_nonnull): Handle multiple nonnull
attributes properly.
* c-c++-common/pr28656.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/pr28656.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/28656] duplicated null argument warning on memcpy()
[not found] <bug-28656-4@http.gcc.gnu.org/bugzilla/>
2012-07-19 13:12 ` [Bug c++/28656] duplicated null argument warning on memcpy() jakub at gcc dot gnu.org
2012-07-20 9:37 ` jakub at gcc dot gnu.org
@ 2012-08-22 20:45 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-08-22 20:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28656
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.8.0
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-08-22 20:45:25 UTC ---
I guess we can close this as fixed for 4.8.0.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/28656] duplicated null argument warning on memcpy()
2006-08-08 18:16 [Bug c++/28656] New: unhelpful " sebor at roguewave dot com
` (2 preceding siblings ...)
2006-10-13 21:09 ` sebor at roguewave dot com
@ 2006-10-13 21:14 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-13 21:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-10-13 21:14 -------
One question is the duplicated warning a regression and is it a C++ front-end
problem or also a C one too?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28656
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/28656] duplicated null argument warning on memcpy()
2006-08-08 18:16 [Bug c++/28656] New: unhelpful " sebor at roguewave dot com
2006-10-13 12:44 ` [Bug c++/28656] duplicated " falk at debian dot org
2006-10-13 21:03 ` sebor at roguewave dot com
@ 2006-10-13 21:09 ` sebor at roguewave dot com
2006-10-13 21:14 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 7+ messages in thread
From: sebor at roguewave dot com @ 2006-10-13 21:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sebor at roguewave dot com 2006-10-13 21:09 -------
I opened bug 29465 with a request for the new warning.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28656
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/28656] duplicated null argument warning on memcpy()
2006-08-08 18:16 [Bug c++/28656] New: unhelpful " sebor at roguewave dot com
2006-10-13 12:44 ` [Bug c++/28656] duplicated " falk at debian dot org
@ 2006-10-13 21:03 ` sebor at roguewave dot com
2006-10-13 21:09 ` sebor at roguewave dot com
2006-10-13 21:14 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 7+ messages in thread
From: sebor at roguewave dot com @ 2006-10-13 21:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from sebor at roguewave dot com 2006-10-13 21:02 -------
You're right, I missed that. I confess I don't quite understand the rationale
for this in the standard and I'm not aware of any plaform that causes problems
for such calls but based on Doug Gwyn's response to my query the undefined
behavior is intentional. Go figure.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28656
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/28656] duplicated null argument warning on memcpy()
2006-08-08 18:16 [Bug c++/28656] New: unhelpful " sebor at roguewave dot com
@ 2006-10-13 12:44 ` falk at debian dot org
2006-10-13 21:03 ` sebor at roguewave dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: falk at debian dot org @ 2006-10-13 12:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from falk at debian dot org 2006-10-13 12:43 -------
>From the standard:
[...] n can have the value zero on a call to that function. Unless
explicitly stated otherwise in the description of a particular
function in this subclause, pointer arguments on such a call shall
still have valid values.
So the warning is justified (but not giving it twice).
For the missing warning on the second memcpy, please file a second report since
this is a totally different problem (and would require some aliasing analysis
to detect).
--
falk at debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|unhelpful null argument |duplicated null argument
|warning on memcpy() |warning on memcpy()
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28656
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-08-22 20:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-28656-4@http.gcc.gnu.org/bugzilla/>
2012-07-19 13:12 ` [Bug c++/28656] duplicated null argument warning on memcpy() jakub at gcc dot gnu.org
2012-07-20 9:37 ` jakub at gcc dot gnu.org
2012-08-22 20:45 ` paolo.carlini at oracle dot com
2006-08-08 18:16 [Bug c++/28656] New: unhelpful " sebor at roguewave dot com
2006-10-13 12:44 ` [Bug c++/28656] duplicated " falk at debian dot org
2006-10-13 21:03 ` sebor at roguewave dot com
2006-10-13 21:09 ` sebor at roguewave dot com
2006-10-13 21:14 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).