在 2023/12/12 上午9:58, chenglulu 写道:
在 2023/12/10 上午12:38, Xi Ruoyao 写道:
We are excluding loongarch-opts.h from target libraries, but now struct
loongarch_target and gcc_options are not declared in the target
libraries, causing:
In file included from ../.././gcc/options.h:8,
from ../.././gcc/tm.h:49,
from ../../../gcc/libgcc/fixed-bit.c:48:
../../../gcc/libgcc/../gcc/config/loongarch/loongarch-opts.h:57:41:
warning: 'struct gcc_options' declared inside parameter list will not
be visible outside of this definition or declaration
57 | struct gcc_options *opts,
| ^~~~~~~~~~~
So exclude the declarations referring to the C++ structs as well.
gcc/ChangeLog:
* config/loongarch/loongarch-opts.h (la_target): Move into #if
for loongarch-def.h.
(loongarch_init_target): Likewise.
(loongarch_config_target): Likewise.
(loongarch_update_gcc_opt_status): Likewise.
---
Bootstrapped and regtested on loongarch64-linux-gnu. Ok for trunk?
I don't understand. I tested it when I submitted the code, but I
didn't find this problem.
I think such a problem will cause compilation errors when
--enable-bootstrap, right?
I've seen a warning message.
Thanks!