public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Sam James <sam@gentoo.org>
Cc: 钟居哲 <juzhe.zhong@rivai.ai>, thomas <thomas@codesourcery.com>,
	fweimer <fweimer@redhat.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 2/6] c: Turn int-conversion warnings into permerrors
Date: Sat, 2 Dec 2023 08:19:21 -0700	[thread overview]
Message-ID: <bb723233-e9aa-4a32-9b22-7a5e5509c144@gmail.com> (raw)
In-Reply-To: <87il5h6tq3.fsf@gentoo.org>



On 12/1/23 22:47, Sam James wrote:
> 
> Jeff Law <jeffreyalaw@gmail.com> writes:
> 
>> On 12/1/23 18:13, Sam James wrote:
>>> 钟居哲 <juzhe.zhong@rivai.ai> writes:
>>>
>>>> Hi, This patch cause error on building newlib/glibc/musl on RISC-V port:
>>>>
>>>> /work/home/jzzhong/work/toolchain/riscv/build/dev-rv64gcv_zvfh_zfh-lp64d-medany-newlib-spike-debug/../../newlib/libgloss/riscv/sys_access.c:8:40:
>>>> error: passing argument 3 of 'syscall_errno' makes integer from pointer without a cast [-Wint-conversion]
>>>>       8 |   return syscall_errno (SYS_access, 2, file, mode, 0, 0, 0, 0);
>>>>         |                                        ^~~~
>>>>         |                                        |
>>>>         |                                        const char *
>>> This looks like an issue in newlib. We expect broken code to be
>>> broken
>>> by the recent changes. Can you investigate it on the newlib side?
>> A ton of stuff in newlib/libgloss is broken due to the compiler
>> changes.   But that's not a big surprise -- much of the
>> newlib/libgloss code is c89 and clearly wrong for c99 and newer.
> 
> Yeah, it's probably a reasonable candidate for -fpermissive to start
> with until it's cleaned up.
Perhaps.  Particularly if it can be confined to libgloss as that's where 
the bulk of the problems are.   It'd be even better if we could 
constrain it per-port, but I suspect putting all that in place would be 
more work than just fixing this stuff.



> 
> (Also, sorry, I didn't mean my comment to appear glib. I just meant to
> say "yes, this looks expected".)
No worries, I didn't take it that way at all.  I fully agree this looks 
expected and while annoying it's not a big deal IMHO.  We fix and move on.

jeff

  reply	other threads:[~2023-12-02 15:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02  0:33 钟居哲
2023-12-02  1:10 ` Patrick O'Neill
2023-12-02  1:53   ` 钟居哲
2023-12-02  3:25     ` Patrick O'Neill
2023-12-02  1:13 ` Sam James
2023-12-02  3:40   ` Jeff Law
2023-12-02  5:47     ` Sam James
2023-12-02 15:19       ` Jeff Law [this message]
2023-12-04  7:45         ` Kito Cheng
2023-12-05  0:25           ` Kito Cheng
  -- strict thread matches above, loose matches on Subject: below --
2023-11-13 13:09 [PATCH 0/6] Turn some C warnings into errors by default Florian Weimer
2023-11-13 13:10 ` [PATCH 2/6] c: Turn int-conversion warnings into permerrors Florian Weimer
2023-11-13 19:24   ` Jeff Law
2023-12-01 11:29   ` Thomas Schwinge
2023-12-01 11:36     ` Florian Weimer

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=bb723233-e9aa-4a32-9b22-7a5e5509c144@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=sam@gentoo.org \
    --cc=thomas@codesourcery.com \
    /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).