Linux-Sparse Archive mirror
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
To: linux-sparse@vger.kernel.org
Subject: [bug] false positive "invalid initializer"
Date: Tue, 28 Oct 2025 15:26:18 +0100 (CET)	[thread overview]
Message-ID: <6dc61f89-b00c-3013-ef1c-9566f18e1592@linux.intel.com> (raw)

Hi

Using this example

void foo(void)
{
 	char c[] = "say";
 	__auto_type x = c;
 	const __typeof__(x) y = x;

 	(void)y;
}

results in

$ sparse -v -nostdinc -o ../l.o -c ../l.c
../l.c:4:25: error: invalid initializer
../l.c:5:33: error: invalid initializer

which appears to be a bug to me. Any fix suggestions would be appreciated.

Thanks
Guennadi

                 reply	other threads:[~2025-10-28 14:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6dc61f89-b00c-3013-ef1c-9566f18e1592@linux.intel.com \
    --to=guennadi.liakhovetski@linux.intel.com \
    --cc=linux-sparse@vger.kernel.org \
    /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).