Mercurial > projects > ldc
comparison dmd/parse.c @ 737:041c1596d217
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.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 28 Oct 2008 15:41:09 +0100 |
parents | 51797efb6975 |
children | bc982f1ad106 |
comparison
equal
deleted
inserted
replaced
736:e4e50f4b58cd | 737:041c1596d217 |
---|---|
347 break; | 347 break; |
348 | 348 |
349 case TOKalign: | 349 case TOKalign: |
350 { unsigned n; | 350 { unsigned n; |
351 | 351 |
352 // LDC better align code locations | |
353 Loc alignloc = loc; | |
354 | |
352 s = NULL; | 355 s = NULL; |
353 nextToken(); | 356 nextToken(); |
354 if (token.value == TOKlparen) | 357 if (token.value == TOKlparen) |
355 { | 358 { |
356 nextToken(); | 359 nextToken(); |
365 } | 368 } |
366 else | 369 else |
367 n = global.structalign; // default | 370 n = global.structalign; // default |
368 | 371 |
369 a = parseBlock(); | 372 a = parseBlock(); |
370 s = new AlignDeclaration(loc, n, a); | 373 s = new AlignDeclaration(alignloc, n, a); |
371 break; | 374 break; |
372 } | 375 } |
373 | 376 |
374 case TOKpragma: | 377 case TOKpragma: |
375 { Identifier *ident; | 378 { Identifier *ident; |