From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 8C16138582BE for ; Sat, 2 Dec 2023 15:19:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C16138582BE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8C16138582BE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::434 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701530366; cv=none; b=uFdpiA3+100OA9ePryB281hgCcoxtzi/Xs5plPs0hoVeMDSR+0kbX2rmUIESaPBeVtfLc7k6oYqNoXy0i6ERmlSEU3uJkmfYvDXFE5m8nEULNXuM2UIb2rKu8PlT8jorwhFXtH6pM6lV09KzLyY1ZetVBlbypNNMfNzhmj9Y11g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701530366; c=relaxed/simple; bh=2sCACqQceznG4h8kCwcglGINh6hXrBeTvmztn+bbGj4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=diysl0T1w942CKO7iIpPA3gHPg2Akcyhybbx5F5w5QCd7H8TCrWeqQgvkZNw5mDvFAVShxP60zUFrW6DOeE1T7IYXH/6TVHl+vzVxgPf1RN1AuX5Zw//ug25SHMmNxuBMngj1wNzplFtlYpYI65KgC/Vn/9QmaUUf7oF+9atmGA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6cddb35ef8bso2621362b3a.2 for ; Sat, 02 Dec 2023 07:19:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701530363; x=1702135163; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CO4/M9XGeG8KSwcEV+xq4srZ7MNQkY6nyhV4JM1q52A=; b=WTzUlTIZmFNVchlVnLSiG3f2a9L1dcRgsnliK4icr7tSsf9EhS86mNa3SmrDHB7cT4 HOcsBLQkCA7rEdyk19RyoWvSkzecBfba04WV5h713KTsW1tChnpocuSzq9rUHv6ECn0a hBY3q3ww6emKzQjUro11eK0Ploh1p+HB0l18xzJiE3Zz22KcDNwK8SnGqW/u7YxBf/jc fii5Bb+8Uj8Z3ODrJ+dQkJ6tUCmZmLFuDC6DH5gl8tJ0J5/9DfP24GVDTMI5riSJzx1q OyFKvTXov2FnISGhRYeaSkUQSh7QbMQqvYH39dSVo+IA2appTlc104nd5EkZ0iHVtB2T fNMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701530363; x=1702135163; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CO4/M9XGeG8KSwcEV+xq4srZ7MNQkY6nyhV4JM1q52A=; b=QKX+g0lYNn8fr1jMXl751Du7dhGmUjEWXWzY7E8kD98gAOqdcGlmxMGn8PsrHBO5DW Gkm/HBoEoBKfa/7YIqQX4KjDD8Fqtv8IWbOkaQCUDN7YajTbKE7Snn0byrd5vwt99vX0 NwAW/8vTF+1EreejFyJbmXQ5IysPHoEdTHJt/4m3SfdEIjM/dApGb4SCIksZj7ihopcG wUuVCOcBj8iIvQ+VqMvwcXaPnB71agwXGJEVxaWKQj0pMd7pZfjlb10L6lZk94S/cm/1 dkyN2HeLQ71FoNp6zXeT4XR5P/7Olob33La1/52BUDnqGoyBvmzNiafa9fAr/TDtmk/E FCQQ== X-Gm-Message-State: AOJu0YyH2PLkHX+wX3n2qHATvh7Sc28W4q5xQiG9+6VcuI15kd8dSrMg DoeJzHv+qAc96z0Z50R22IllykyS4epqIQ== X-Google-Smtp-Source: AGHT+IHzqdBBkeXeJy8+N6hcxKV7U+13FpHrgcPITJvnIg4B+sGubIjnnYG6qRMiSfV3b5Bd7riEAg== X-Received: by 2002:a05:6a20:8e16:b0:18d:1321:c28a with SMTP id y22-20020a056a208e1600b0018d1321c28amr576025pzj.10.1701530363312; Sat, 02 Dec 2023 07:19:23 -0800 (PST) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id b13-20020a056a000ccd00b006cbb3512266sm341908pfv.1.2023.12.02.07.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Dec 2023 07:19:22 -0800 (PST) Message-ID: Date: Sat, 2 Dec 2023 08:19:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/6] c: Turn int-conversion warnings into permerrors Content-Language: en-US To: Sam James Cc: =?UTF-8?B?6ZKf5bGF5ZOy?= , thomas , fweimer , gcc-patches@gcc.gnu.org References: <874jh18kyj.fsf@gentoo.org> <2aa94e28-edfb-41bb-93ee-b2d69c801279@gmail.com> <87il5h6tq3.fsf@gentoo.org> From: Jeff Law In-Reply-To: <87il5h6tq3.fsf@gentoo.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/1/23 22:47, Sam James wrote: > > Jeff Law writes: > >> On 12/1/23 18:13, Sam James wrote: >>> 钟居哲 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