https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110980
Bug ID: 110980
Summary: -flang-info-include-translate does not work with no
argument
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: namniav at gmail dot com
Target Milestone: ---
Docs says that with no argument -flang-info-include-translate will note all
include translation. (Docs link:
https://gcc.gnu.org/onlinedocs/gcc/gcc-command-options/c%2B%2B-modules.html)
However, it doesn't work with no argument: there is no note for translating
#include <string> to import when using -flang-info-include-translate. It does
note when using -flang-info-include-translate=<string>.
$ cat mapper-file
/opt/homebrew/Cellar/gcc/13.1.0/include/c++/13/string string.gcm
$ cat test.cpp
#include <string>
$ g++ -std=c++20 -fmodules-ts -xc++-system-header -fmodule-mapper=mapper-file
string
$ g++ -std=c++20 -fmodules-ts -fmodule-mapper=mapper-file
-flang-info-include-translate -flang-info-module-cmi -E test.cpp -o test.cpp.E
In module imported at test.cpp:1:1:
/opt/homebrew/Cellar/gcc/13.1.0/include/c++/13/string: note: reading CMI
'string.gcm'
$ g++ -std=c++20 -fmodules-ts -fmodule-mapper=mapper-file
-flang-info-include-translate="<string>" -flang-info-module-cmi -E test.cpp -o
test.cpp.E
test.cpp:1:10: note: include
'/opt/homebrew/Cellar/gcc/13.1.0/include/c++/13/string' translated to import
1 | #include <string>
| ^~~~~~~~
In module imported at test.cpp:1:1:
/opt/homebrew/Cellar/gcc/13.1.0/include/c++/13/string: note: reading CMI
'string.gcm'