[genksyms patch 1/4] parser: fix the __attribute__ rule

Andreas Gruenbacher
2008-07-21T03:04:26Z

[-- Attachment #1: patches.suse/genksyms-syntax.diff --]
[-- Type: text/plain, Size: 719 bytes --]

Gcc __attribute__ definitions may occur repeatedly, e.g.,

static int foo __attribute__((__used__))
__attribute__((aligned (16)));

The genksyms parser does not understand this, and generates a syntax error.
Fix this case.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>

---
scripts/genksyms/parse.y | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/scripts/genksyms/parse.y
===================================================================
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -446,7 +446,7 @@ member_bitfield_declarator:

attribute_opt:
/* empty */ { $$ = NULL; }
- | ATTRIBUTE_PHRASE
+ | attribute_opt ATTRIBUTE_PHRASE
;