public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: chenglulu <chenglulu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>, gcc-patches@gcc.gnu.org
Cc: i@xen0n.name, xuchenghua@loongson.cn
Subject: Re: [PATCH] LoongArch: Fix warnings building libgcc
Date: Tue, 12 Dec 2023 11:37:58 +0800	[thread overview]
Message-ID: <ad270392-086f-5000-1a2f-a59005436f87@loongson.cn> (raw)
In-Reply-To: <d702cf71-a053-4115-775d-00b081bf6bef@loongson.cn>


在 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!


      reply	other threads:[~2023-12-12  3:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-09 16:38 Xi Ruoyao
2023-12-12  1:58 ` chenglulu
2023-12-12  3:37   ` chenglulu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad270392-086f-5000-1a2f-a59005436f87@loongson.cn \
    --to=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).