public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix alignment option parser (PR90684)
@ 2019-05-30 16:47 Wilco Dijkstra
  2019-05-31 22:25 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Wilco Dijkstra @ 2019-05-30 16:47 UTC (permalink / raw)
  To: GCC Patches; +Cc: nd

Fix the alignment option parser to always allow up to 4 alignments.
Now -falign-functions=16:8:8:8 no longer reports an error.

OK for commit (and backport to GCC9)?

ChangeLog:
2019-05-30  Wilco Dijkstra  <wdijkstr@arm.com>


	PR driver/90684
	* gcc/opts.c (parse_and_check_align_values): Allow 4 alignment values.
--

diff --git a/gcc/opts.c b/gcc/opts.c
index a1ccd97746890b8259d000cbdeeaddc02df0b74a..d3501421f7879113ab4422063cedfabd23cadce7 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2022,14 +2022,7 @@ parse_and_check_align_values (const char *flag,
   free (str);
 
   /* Check that we have a correct number of values.  */
-#ifdef SUBALIGN_LOG
-  unsigned max_valid_values = 4;
-#else
-  unsigned max_valid_values = 2;
-#endif
-
-  if (result_values.is_empty ()
-      || result_values.length () > max_valid_values)
+  if (result_values.is_empty () || result_values.length () > 4)
     {
       if (report_error)
 	error_at (loc, "invalid number of arguments for %<-falign-%s%> "

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix alignment option parser (PR90684)
  2019-05-30 16:47 [PATCH] Fix alignment option parser (PR90684) Wilco Dijkstra
@ 2019-05-31 22:25 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2019-05-31 22:25 UTC (permalink / raw)
  To: Wilco Dijkstra, GCC Patches; +Cc: nd

On 5/30/19 10:38 AM, Wilco Dijkstra wrote:
> Fix the alignment option parser to always allow up to 4 alignments.
> Now -falign-functions=16:8:8:8 no longer reports an error.
> 
> OK for commit (and backport to GCC9)?
> 
> ChangeLog:
> 2019-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
> 
> 
> 	PR driver/90684
> 	* gcc/opts.c (parse_and_check_align_values): Allow 4 alignment values.
Based on Martin L's comments in the BZ.  OK for the trunk.
jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-31 22:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 16:47 [PATCH] Fix alignment option parser (PR90684) Wilco Dijkstra
2019-05-31 22:25 ` Jeff Law

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).