[fpc-pascal] FPC happily eats wrong parameters

Sven Barth pascaldragon at googlemail.com
Tue Sep 24 14:28:42 CEST 2013


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.
That FPC warns if multiple files are supplied is by design as there is a 
specific warning about this. FPC will always use the last filename given 
as mentioned here: 
http://www.freepascal.org/docs-html/user/userse70.html#x182-189000C.11

Regards,
Sven



More information about the fpc-pascal mailing list