On 01/13/2016 01:53 AM, Jesper Broge Jørgensen wrote:
genattrab.c can generate if statements that have very deep bracket
nesting causing clang to produce errors (when target=arm-none-eabi) as
explained at https://gcc.gnu.org/ml/gcc/2014-05/msg00032.html
At the above link it was suggested that genattrab.c generated a switch
statement instead. I have made a patch that does just that.

Some preliminaries first - I don't see your name in existing ChangeLogs; am I correct in assuming you've not gone through the copyright assignment process?

Secondly, we're currently in a development phase where we only accept bug fixes for gcc-6. You should resubmit/ping the patch once stage1 opens again.

2016-01-13  Jesper Broge Jørgensen  <jesperbr...@gmail.com>

     * genattrtab.c (check_attr_set_switch): implemented the function
     (write_attr_set): Check if expression can be written as a switch

Please review our coding and documentation standards. ChangeLog entries should be complete sentences (or sometimes brief short-hands: the first one should just be "New function.")

+static int check_attr_set_switch (FILE *outf, rtx exp,
+                    unsigned int attrs_cached, int write_cases, int
indent);

No reason to declare it if it is defined before its use.
+  while (1)
+  {

This and everything else here looks like it isn't following our indentation rules.


Bernd

Reply via email to