From nobody Sun Mar 10 08:24:16 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TstH85GY7z5DZpk for ; Sun, 10 Mar 2024 08:24:20 +0000 (UTC) (envelope-from jguojun@gmail.com) Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TstH75YNhz4JSZ for ; Sun, 10 Mar 2024 08:24:19 +0000 (UTC) (envelope-from jguojun@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=YBmutrpj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of jguojun@gmail.com designates 2607:f8b0:4864:20::112e as permitted sender) smtp.mailfrom=jguojun@gmail.com Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-609eb2cbeccso16027737b3.2 for ; Sun, 10 Mar 2024 00:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710059058; x=1710663858; darn=freebsd.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=qjzr6TS0Qdc3pp42SWUGmAqWTNxPEbiO4GK8ELcacdU=; b=YBmutrpj+TnUgjTOk6KAkUy4B/teBq1o1bvJEZrGaoLGkTC5s7wJB7NIop7byNBSTM Rtu/YYR/HfU0W7EXbG34HF8ZOZcEmJXHFjt99MOs+uRMBTWL1HSmGwdSvjNsTTvHpe1f mv2SVkDgSmCp6C62i6o2Flp9WH4kaR/U6W3j85osXpXlQ1QbRC9qgYTNRnM4/9SVSK18 OVsBxF+85MoXkTQiChwlHr+5RuuHExqi6WherRFVl/yfqSNneDkuUrYx/6i4ZUpD3I5j tTvRQt3919QYPQNyMbMdja3MQtT/pT2/EEGAqZRwHaORWQ7PQw1iqb0rUhrdCDUytz38 2k4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710059058; x=1710663858; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=qjzr6TS0Qdc3pp42SWUGmAqWTNxPEbiO4GK8ELcacdU=; b=E3NKRC7+oCgczbRpEoL/T46cfbjLWyYFXSxgDxh9QUUobPjGF9T1Q516oqlyrx4BAr E4hPE4Okh/kbhsQbL4s5G3gTAbMS3l8oqsWpBqbYEV2MQ88lR2Obr2k5vPgUYYZAT476 +2gVU023lBOn7JMtlIWDwVa8hbU7t22ZGrIYuEnSimn7bJVYFNi6ByfUhrmOxNQMT3mr xw/lNzoY8pVDvnSdAgDMdI8NvTasBipELco3GodsIb/KUaLLmWkVKfm5W2aWxpUB4ckk AcpYilSsJtm5asT1kovxQ1pMhIAIiwZva+haOnfbiO4RaDKBWGOOmZj24f68713Uwi4U L3DA== X-Gm-Message-State: AOJu0YwjAi/fRdJQX/V072AW7boj9c+wTjejd4AU193lKyr5GtyKPiJo v6T38Ut3w0nl0nz8QsnjfBe1xytkjoSVCkjEq/f0wUUV/u9g4WOQPbj05LY= X-Google-Smtp-Source: AGHT+IEXVvoJ3LgG7/PlHceLb0fnXnTYoELEVNR0Ovz0QItU2kIL2JzUacNih5VO6RzSE+ezDzefkQ== X-Received: by 2002:a81:9253:0:b0:609:a55b:805c with SMTP id j80-20020a819253000000b00609a55b805cmr2003761ywg.46.1710059057699; Sun, 10 Mar 2024 00:24:17 -0800 (PST) Received: from [192.168.1.82] (76-218-103-166.lightspeed.sntcca.sbcglobal.net. [76.218.103.166]) by smtp.gmail.com with ESMTPSA id p6-20020a81e206000000b0060a1f3267e2sm472138ywl.42.2024.03.10.00.24.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Mar 2024 00:24:17 -0800 (PST) Message-ID: <4d6edaa6-237d-4207-9047-ddee78ee4b90@gmail.com> Date: Sun, 10 Mar 2024 00:24:16 -0800 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: freebsd-questions From: "Jin Guojun[VFF]" Subject: weird compiler error in 13.3-R Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::112e:from] X-Rspamd-Queue-Id: 4TstH75YNhz4JSZ Updated 13.2 to 13.3 and get a weird compiling failure. The code compiled since FreeBSD release 4 till release 13.2. Both ap (line 119) and vap (line 126) are declared as va_list, somehow clang version 17.0.6 thinks va_list at line 119 is uint, where va_list in line 126 is 'struct __va_list_tag *'. Checked /usr/include and va_list is declared in /usr/include/sys/_stdarg.h:39:  typedef __va_list       va_list; included by /usr/include/stdarg.h via x86/stdarg.h  Does anyone have ideas on what could cause such compiling failure? -Jin     10 #include      11 #include     118 struct  a_build_ctrl_t  {     119         va_list         ap;     /* what is different from vap at line 126?    */     120         argu_type       last_arg_t;     121 };     124     125 arg_fmt_lists*     126 build_arg_fmt_list(arg_fmt_list_string* fmt, va_list vap)     127 {     128     int     na=1;     129     130      arg_fmt_lists* aflp;     131      arg_fmt_lists* aflp_top;     132     133     struct a_build_ctrl_t   abc = {.ap=vap, .last_arg_t=ARGU_NONE};  ...       } test.c:133:34: error: incompatible pointer to integer conversion initializing 'unsigned int' with an expression of type 'struct __va_list_tag *' [-Wint-conversion]   133 | struct a_build_ctrl_t   abc = {.ap=vap, .last_arg_t=ARGU_NONE};