* [PATCH] Fix PR54326
@ 2012-08-20 7:31 Richard Guenther
0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2012-08-20 7:31 UTC (permalink / raw)
To: gcc-patches
The following should fix PR54326 (3.4.6 at least compiles genoutput.c
without warnings after this).
Bootstrap running on x86_64-unknown-linux-gnu.
Richard.
2012-08-20 Richard Guenther <rguenther@suse.de>
PR bootstrap/54326
* genoutput.c (note_constraint): Properly use CONST_CAST.
Index: gcc/genoutput.c
===================================================================
--- gcc/genoutput.c (revision 190523)
+++ gcc/genoutput.c (working copy)
@@ -1175,7 +1175,7 @@ note_constraint (rtx exp, int lineno)
}
}
new_cdata = XNEWVAR (struct constraint_data, sizeof (struct constraint_data) + namelen);
- strcpy ((char *)new_cdata + offsetof(struct constraint_data, name), name);
+ strcpy (CONST_CAST(char *, new_cdata->name), name);
new_cdata->namelen = namelen;
new_cdata->lineno = lineno;
new_cdata->next_this_letter = *slot;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-20 7:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-20 7:31 [PATCH] Fix PR54326 Richard Guenther
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).