mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-12 06:49:02 +02:00
Removed warnings on ignored aligns. Only do aligment on packed structs, align(1) struct Packed { ... }
Changed the way struct/class fields are added, first small part of cleaning up these... Make struct/class/union fields aware of any anonymous struct/union they might be part of, not yet really useful, but part of getting better union support.
This commit is contained in:
@@ -349,6 +349,9 @@ Array *Parser::parseDeclDefs(int once)
|
||||
case TOKalign:
|
||||
{ unsigned n;
|
||||
|
||||
// LDC better align code locations
|
||||
Loc alignloc = loc;
|
||||
|
||||
s = NULL;
|
||||
nextToken();
|
||||
if (token.value == TOKlparen)
|
||||
@@ -367,7 +370,7 @@ Array *Parser::parseDeclDefs(int once)
|
||||
n = global.structalign; // default
|
||||
|
||||
a = parseBlock();
|
||||
s = new AlignDeclaration(loc, n, a);
|
||||
s = new AlignDeclaration(alignloc, n, a);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user