* [C++ Patch] Avoid uninitialized warning in pt.c
@ 2011-10-28 20:16 Paolo Carlini
2011-10-28 20:55 ` Jason Merrill
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Carlini @ 2011-10-28 20:16 UTC (permalink / raw)
To: gcc-patches; +Cc: Jason Merrill
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
Hi,
I think we have to do this, the warning I'm seeing doesn't seem bogus:
in principle comp_template_args_with_info may leave bad_old_arg and
bad_new_arg uninitialized.
Ok?
Thanks,
Paolo.
////////////////
[-- Attachment #2: CL --]
[-- Type: text/plain, Size: 127 bytes --]
2011-10-28 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (unify_pack_expansion): Initialize bad_old_arg and bad_new_arg.
[-- Attachment #3: patchlet --]
[-- Type: text/plain, Size: 439 bytes --]
Index: pt.c
===================================================================
--- pt.c (revision 180623)
+++ pt.c (working copy)
@@ -15715,7 +15715,7 @@ unify_pack_expansion (tree tparms, tree targs, tre
}
else
{
- tree bad_old_arg, bad_new_arg;
+ tree bad_old_arg = NULL_TREE, bad_new_arg = NULL_TREE;
tree old_args = ARGUMENT_PACK_ARGS (old_pack);
if (!comp_template_args_with_info (old_args, new_args,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [C++ Patch] Avoid uninitialized warning in pt.c
2011-10-28 20:16 [C++ Patch] Avoid uninitialized warning in pt.c Paolo Carlini
@ 2011-10-28 20:55 ` Jason Merrill
0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 2011-10-28 20:55 UTC (permalink / raw)
To: Paolo Carlini; +Cc: gcc-patches
OK.
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-28 19:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-28 20:16 [C++ Patch] Avoid uninitialized warning in pt.c Paolo Carlini
2011-10-28 20:55 ` Jason Merrill
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).