Why is -Mfpc the default language style?
I assume -Mobjfpc or -M2 is the most used style.
Why does -Mobjfpc overwrite the assember style?

Mailing lists / fpc-pascal / 2012-08
5 messages · 4 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Why is -Mfpc the default language style?
I assume -Mobjfpc or -M2 is the most used style.
Why does -Mobjfpc overwrite the assember style?
Rainer Stratmann wroteWhy is -Mfpc the default language style?
For backward compatibility.
Why does -Mobjfpc overwrite the assember style?
Language modes set all language-related switches to the default for that mode, so that it is possible to e.g. add {$mode objfpc} at the top of a unit and be sure that it will compile for anyone regardless of how their fpc.cfg looks like or what switches they specified on the command line.
Jonas
Why is -Mfpc the default language style? I assume -Mobjfpc or -M2 is the most used style.…
Rainer Stratmann wroteWhy is -Mfpc the default language style? I assume -Mobjfpc or -M2 is the most used style.
"fpc" was the first mode that FPC supported, so that's kept because of backwards compatibility.
Why does -Mobjfpc overwrite the assember style?
Because only for modes TP and Delphi the default style is Intel instead of AT&T which was chosen as the default for FPC (not the mode, but the compiler) on x86 systems.
And before you ask: I don't know why AT&T was chosen as default, maybe by personal preference. I personally indeed prefer the AT&T syntax over the Intel one...
Regards,
Sven
In our previous episode, Sven Barth said:
Originally FPC only supported mode direct, passing assembler mostly verbatim (as text) to the backend assembler (G)AS. And AS was AT&T only at the time.
The first assembler readers date from the 0.99.8 period IIRC, or maybe one later. This also allowed for using parameter symbols etc. (+/- 1998?)
Intel followed rather quickly, but I think that Intel style was only made the default of mode Delphi in 1.9.8 or so. (so say late 2004 or early 2005), when assembler really became somewhat compatible with the change to from oldfpccall to the "register" calling convention
Thank you for the explanation :)
Regards,
Sven