https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125137

            Bug ID: 125137
           Summary: `-Q --help`: cannot specify language without source
                    files
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ivan.lazaric.gcc at gmail dot com
  Target Milestone: ---

Suppose you wanted to find out default for -fconstexpr-ops-limit via `-Q
--help`

```
$ g++ -Q --help=c++ | grep constexpr-ops
  -fconstexpr-ops-limit=<number>        [available in C++, ObjC++]
```
I don't have issues with this, 
the number doesn't make sense if we aren't compiling C++.

```
$ g++ foo.cpp -Q --help=c++ | grep constexpr-ops
  -fconstexpr-ops-limit=<number>        33554432 bytes
```
We get the answer we were looking for, foo.cpp doesn't even need to exist.


But the following I expected to work and doesn't:
```
$ g++ -xc++ -Q --help=c++ | grep constexpr-ops
g++: fatal error: no input files
compilation terminated.
PROGRAM FAILED WITH EXIT CODE 1
```

Reply via email to