Naming flag for specifying the output file name for Binary Module Interface files

Iain Sandoe
Wed Dec 7 16:58:15 GMT 2022

> On 7 Dec 2022, at 16:52, Nathan Sidwell via Gcc <> wrote:
> On 12/7/22 11:18, Iain Sandoe wrote:
>> I think it is reasonable to include c++ in the spelling, since other languages supported by
>> GCC (and clang in due course) have modules.
> I disagree (about the reasonableness part).  Other languages have modules, true, but if they want to name the output file, why not have the same option spelling?
> I.e. why are we considering:
>   $compiler -fc++-module-file=bob
>   $compiler -ffortran-module-file=bob foo.f77
> The language is being selected implicitly by the file suffix (or explictly via -X$lang).  There's no reason for some other option controlling an aspect of the compilation to rename the language.  We don't do it for language-specific warning options, and similar.  (i.e. no -f[no-]c++-type-aliasing vs -fc-type-aliasing, nor -Wc++-extra vs -Wc-extra[*]

Fair points.

Unfortunately (in case it has not already been mentioned in this thread) ‘-fmodule-file=‘ is already taken and it means an input, not an output.  So, whatever we choose it needs to be distinct from that.


More information about the Gcc mailing list