On Mon, Nov 17, 2025 at 04:48:30PM +0530, Jason Merrill wrote:
> > If this would be solely for GCC testsuite and nothing else, my preference
> > would be to do this in DejaGNU with // { dg-compile-std-module
> > But if the intent is also users compiling simple C++ sources, then that
> > doesn't work.
> 
> Indeed, it's intended more for users.
> 
> > I wonder if expansion of --compile-std-module into
> > -xc++-system-header bits/stdc++.h -xc++-system-module bits/std.cc 
> > -xc++-system-module bits/std.compat.cc -xnone
> > won't cause surprising result for users which are using -x <language>.
> > E.g. if their C++ source is *.c and they compile with
> > g++ -xc++ --compile-std-module foo.c
> 
> Do people put other options between -x and their source files?

I'm afraid they do.  Especially when compiling multiple files in one command, 
they put
other options in between.

> I suppose we
> could insert the new options before any user-specified -x (or source file)
> rather than at the position of the ---compile-std-module.

That would work too, sure.

        Jakub

Reply via email to