Gale Paeper wrote:
Adriaan van Os wrote:
Frank Heckenbach wrote:
I've uploaded a new alpha to http://www.gnu-pascal.de/alpha/
- New option `--maximum-field-alignment=N'
Also as a compiler directive $maximum-field-alignment=N.
Is there an easy way to save and restore the maximum-field-alignment setting?
Something like other Mac Pascal dialect implementations' $PUSH and $POP compiler directives for a compiler directive variable setting save/restore stack would be desireable for Pascal interface translations of Apple's Mach-o Mac OS X C interfaces.
GPC has `{$local}' and `{$endlocal}', but currently only for "Boolean" options. Perhaps I can make it work with field-alignment as well. (Currently it's handled in the preprocessor, so it's not so easy, but perhaps after the preprocessor is integrated into the compiler.)
It works great, for example the following data structure
How does it work for a mixture of alignments and with single (32 bit) and double (64 bit) floating point thrown into mixture?
Also, it would be a good idea to test more than just record sizes in a single code block. Things like actual field offsets and composite types with a mixture of alignments composed through uses clauses and import specifications should be part of the tests. In other words, stress tests to ensure there are no surprises/bugs in the implementation for all the various ways it might be used in general use.
Yes, this would be useful.
Frank