bugfix for attribute parsing

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32791 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-04-06 19:43:43 +00:00
parent 387687ccbf
commit e8aee2c889
2 changed files with 22 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2011-04-06 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/AGSparser.m: ignore __attribute__ in declarator to fix bug
#33008
2011-04-05 Wolfgang Lux <wolfgang.lux@gmail.com>
* Tests/base/coding/decoding.m: Fix bogus byte swap code for

View file

@ -1328,6 +1328,23 @@ recheck:
[self skipStatementLine];
goto fail;
}
if ([s isEqual: @"__attribute__"] == YES)
{
if ([self skipSpaces] < length && buffer[pos] == '(')
{
unsigned start = pos;
NSString *attr;
[self skipBlock]; // Skip the attributes
attr = [NSString stringWithCharacters: buffer + start
length: pos - start];
}
else
{
[self log: @"strange format __attribute__"];
}
continue;
}
if ([s isEqualToString: @"GS_EXPORT"] == YES)
{
s = @"extern";