Linux-Sparse Archive mirror
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Luc Van Oostenryck <lucvoo@kernel.org>
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: sparse regex error
Date: Thu, 21 Dec 2023 01:45:41 +0000	[thread overview]
Message-ID: <24cb6194-d04d-4c80-bd95-4f7356667884@ramsayjones.plus.com> (raw)
In-Reply-To: <uug4xslokvlxr6z24q52z4pt7nrtiimbzunz2gz3kpilk4kxts@7jljsksi6baq>



On 20/12/2023 23:13, Luc Van Oostenryck wrote:
[snip] 
> The following patch is a bit ugly but should solve the problem here above.
> It's hasn't had much testing, only the testsuite.
> 
> Cheers,
> -- Luc
> 
> 
>>From 2d1feff1551a97fdfd1149f4772331c540e638c9 Mon Sep 17 00:00:00 2001
> From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> Date: Wed, 20 Dec 2023 22:00:05 +0100
> Subject: [PATCH] handle protoype scope
> 

Hi Luc,

This looks good and _much_ better than my initial attempt! ;)

I tried your patch and everything looks good on the sparse repo.
On Git, however, things didn't go quite so well, thus:

  $ make V=1 sparse >ssp-out 2>&1
  $ tail -4 ssp-out
  >add-patch.sp
  add-patch.c: note: in included file (through git-compat-util.h):
  /usr/include/regex.h:682:41: error: Variable length array is used.
  make: *** [Makefile:3234: add-patch.sp] Error 1
  $ 

I think this is caused by -Wvla, which git passes to gcc, along with
sparse (perhaps) not supporting a GCC #pragma; just after the _REGEX_NELTS
definition in the header file we find:

  #if defined __GNUC__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
  # pragma GCC diagnostic push
  # pragma GCC diagnostic ignored "-Wvla"
  #endif

But I haven't had time to think about this too deeply. It's nearly 2am
and I need to get some sleep - I just wanted to report this ASAP.

Thanks for the patch.

ATB,
Ramsay Jones


  reply	other threads:[~2023-12-21  1:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20  0:18 sparse regex error Ramsay Jones
2023-12-20 23:13 ` Luc Van Oostenryck
2023-12-21  1:45   ` Ramsay Jones [this message]
2024-07-17 18:44   ` Junio C Hamano

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=24cb6194-d04d-4c80-bd95-4f7356667884@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=lucvoo@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).