mirror of
https://review.haiku-os.org/buildtools
synced 2025-01-31 02:24:40 +01:00
gcc: Avoid out-of-scope access of newv.
* Cherry-picked regression fix from gcc 4.6 mainline * Simple 2 line change. * GCC 4.7+ compiling gcc 4.6 would fail * GCC bug 51969 * Fix was added to gcc 4.6-mainline via rev 184239 * Resolves #8470
This commit is contained in:
parent
cc75156e51
commit
2dc19755cc
@ -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,
|
int has_length, struct fileloc *line, const char *if_marked,
|
||||||
bool emit_pch, type_p field_type, const char *field_name)
|
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
|
/* If the field reference is relative to V, rather than to some
|
||||||
subcomponent of V, we can mark any subarrays with a single stride.
|
subcomponent of V, we can mark any subarrays with a single stride.
|
||||||
We're effectively treating the field as a global variable in its
|
We're effectively treating the field as a global variable in its
|
||||||
own right. */
|
own right. */
|
||||||
if (v && type == v->type)
|
if (v && type == v->type)
|
||||||
{
|
{
|
||||||
struct pair newv;
|
|
||||||
|
|
||||||
newv = *v;
|
newv = *v;
|
||||||
newv.type = field_type;
|
newv.type = field_type;
|
||||||
newv.name = ACONCAT ((v->name, ".", field_name, NULL));
|
newv.name = ACONCAT ((v->name, ".", field_name, NULL));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user