D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7065 - align() refused for struct defined inside functions
Summary: align() refused for struct defined inside functions
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
 
Reported: 2011-12-04 09:33 UTC by bearophile_hugs
Modified: 2012-10-08 04:44 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2011-12-04 09:33:26 UTC
A problem found by GrahamC:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=30987

D2 code, DMD 2.057head:


align(1) struct Foo {} // OK
unittest {
    align(1) struct Bar {} // found 'align' instead of statement
}
void main() {
    align(1) struct Spam {} // found 'align' instead of statement
}
Comment 2 github-bugzilla 2012-10-08 04:44:27 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d04348f37e3bfb9e7976f2c360c5c06b4d6f62fd
Issue 7065 - align() refused for struct defined inside functions

https://github.com/D-Programming-Language/dmd/commit/381eec8240dcc8eeacd9d81285b77f4324f32090
Merge pull request #562 from 9rnsr/fix6534

Issue 6534 & 7065 & 7172 - Parser improvements for inner aggregates