Peter N Lewis wrote:
- Units without `implementation' part
I have removed the implementation keyword after seeing that comment in the release notes (since they are all interfaces and have no implementation and the keyword is not needed on the Mac in this case). But it appears if this is removed, then the init routine is not included in the .o file even though it appears still to be needed when you import the file:
[...]
Is the keyword needed then, or is this a bug?
Bug.
--- p/parse.y.orig Wed Mar 26 12:36:24 2003 +++ p/parse.y Thu Mar 27 11:43:32 2003 @@ -496,7 +496,7 @@ /* Modules and units */
optional_unit_implementation: - /* empty */ + implicit_module_constructor implicit_module_destructor { CHK_DIALECT (MAC_PASCAL, "units without `implementation' part are a Mac Pascal extension."); } | p_implementation declarations_and_uses optional_unit_init_and_final_part { } ;
Lesson for the future: When new features are added, always submit some test programs. This would have made me notice the bug immediately. (In this case, I now wrote one, so no need to ...)
PS: Tools like nm and objdump are better suited for dumping object files than hex dumps.
Frank