diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-14 23:31:42 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-08-27 15:02:27 -0700 |
commit | b61c3a578b95325f25e08f41c6dfa199b3b53e0b (patch) | |
tree | 7404e25cdb4f5bea438038e4772635836db8392b /gcc-4.6 | |
parent | 65cadbba7f7e816b4b2bff752808b7429d0d0f2a (diff) | |
download | toolchain_gcc-b61c3a578b95325f25e08f41c6dfa199b3b53e0b.tar.gz toolchain_gcc-b61c3a578b95325f25e08f41c6dfa199b3b53e0b.tar.bz2 toolchain_gcc-b61c3a578b95325f25e08f41c6dfa199b3b53e0b.zip |
Fix compilation with GCC 4.7
See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51969
PR bootstrap/51969
Backported from mainline
2011-11-08 Michael Matz <matz@suse.de>
* gengtype.c (write_field_root): Avoid out-of-scope access of newv.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184239 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc-4.6')
-rw-r--r-- | gcc-4.6/gcc/gengtype.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc-4.6/gcc/gengtype.c b/gcc-4.6/gcc/gengtype.c index abf17f8e7..6c0ca4a0b 100644 --- a/gcc-4.6/gcc/gengtype.c +++ b/gcc-4.6/gcc/gengtype.c @@ -3594,14 +3594,13 @@ write_field_root (outf_p f, pair_p v, type_p type, const char *name, int has_length, struct fileloc *line, const char *if_marked, bool emit_pch, type_p field_type, const char *field_name) { + struct pair newv; /* If the field reference is relative to V, rather than to some subcomponent of V, we can mark any subarrays with a single stride. We're effectively treating the field as a global variable in its own right. */ if (v && type == v->type) { - struct pair newv; - newv = *v; newv.type = field_type; newv.name = ACONCAT ((v->name, ".", field_name, NULL)); |