Frank Heckenbach wrote:
BTW, a future GPC version might allow macros that expand to compiler-directives, but AFAICS this wouldn't help here since you'd need this on the MW side where it apparently isn't possible.
Still, this is an interesting idea in other situations. For example {$align powerpc} is a much needed compiler directive in MW. If we can define {$align powerpc} to be a macro in GPC, writing source-code for two compilers becomes easier. For example.
{$align powerpc} Type ... {$align reset}
is better readable than:
{$ifc defined __GPC__} {$local maximum-field-alignment=32} {$endc} {$ifc defined __MWERKS__} {$align powerpc} {$endc} Type ... {$ifc defined __GPC__} {$endlocal} {$endc} {$ifc defined __MWERKS__} {$align reset} {$endc}
Unfortunately, there are still reasons to use MW Pascal and thus to keep library code compatible with both GPC and MW:
(1) MW Pascal produces CFM/PEF binaries (that are compatible with both Mac OS and Mac OS X) (2) Many plug-in architectures on the Macintosh still require CFM/PEF rather than Mach-O (as produced by GPC for Mac OS X) (3) Millions of lines of existing code.
(But I don't want to complain, just elaborating on a theme)
Regards,
Adriaan van Os