On 18/01/16 15:15, Bernd Schmidt wrote:
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
No i have not gone through copyright assignment.
This is my first time trying to contribute to a GNU project so i have
tried following the "Contributing to GCC" at
https://gcc.gnu.org/contribute.html
There i followed the advice to run the patch through
contrib/check_GNU_style.sh and it came out clean. Maybe
contrib/check_GNU_style.sh does not check for indention rules and/or my
editor is set up wrongly so it looked to me like i was following the
coding standard.
I did not know you only accepted bug fixes though one could argue that
this fixes a (style)bug in generated code.