Adriaan van Os wrote:
Peter N. Lewis pointed me to the following:
{$methods-always-virtual} {allowed} {$no-methods-always-virtual} {error message} program P; begin end.
GPC accepts {$methods-always-virtual} as a directive in source code, but it rejects {$no-methods-always-virtual}. Is there a special reason why ?
No, a mistake: --- p/lang-options.h.orig Mon Mar 21 11:31:02 2005 +++ p/lang-options.h Thu Jun 30 13:04:22 2005 @@ -304,7 +304,7 @@ "Do not warn when a unit/module interface differs from the file name (default)") GPC_OPT (1, "-fmethods-always-virtual", methods_always_virtual, 1, "Make all methods virtual (default in `--mac-pascal')") - GPC_OPT (0, "-fno-methods-always-virtual", methods_always_virtual, 0, + GPC_OPT (1, "-fno-methods-always-virtual", methods_always_virtual, 0, "Do not make all methods virtual (default)") GPC_OPT (1, "-Wimplicit-abstract", warn_implicit_abstract, 1, "Warn when an object type not declared `abstract' contains an abstract method (default)")
The value of the flag changes also (I think) when switching from {$mac-pascal} to {$gnu-pascal}.
Yes, it should be on in mac-pascal, off by default. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8