Show quoted text 13 lines
Am 24.09.2013 14:17, schrieb Mattias Gaertner:
> Hi,
>
> When calling "fpc -d foo test.pas" there are two mistakes:
> First the -d parameter is missing a value, which fpc silently ignores.
> And second there are two files to compile. FPC ignores that too, gives
> a hint, but compiles anyway.
>
> Design or bug?
The '-d' argument is written explicitely to do something only if it has
a (directly following) argument. Otherwise it does nothing. If this
should be considered a bug or not is up to discussion, but the code is
this way at least since the migration to SVN.
Well, maybe the word "bug" is too strong.
It would be a nice feature, if fpc does not let the user shoot his foot this way.
Yes, it is this way since at least 2000. I assumed that eventually fpc will support compiling multiple files. But I guess this will not happen, so maybe it would be better to change the warning to an error. A warning is defined as something that is probably wrong, but may be needed in some cases. Where is the need for passing files that the compiler ignores?
Mattias