From: picca <picca@debian.org>
To: Victor Gambier <victor.gambier@inria.fr>
Cc: Julia Lawall <julia.lawall@inria.fr>, cocci@inria.fr
Subject: Re: [cocci] Bug dans la parseur de coccinelle ?
Date: Thu, 12 Nov 2026 13:36:11 +0100 [thread overview]
Message-ID: <52f7e18cb3dfd61db7e9575c44353928@debian.org> (raw)
In-Reply-To: <e94be607-8aeb-493b-8dec-8415e05551b1@inria.fr>
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
Le 2026-11-12 13:29, Victor Gambier a écrit :
> Thank you. I cannot reproduce the error. Could you send me the file
> "hkl/ccan/array_size/array_size.h", as well as the output of `spatch
> --version`?
>
> Victor
here it is :)
$ spatch --version
spatch version 1.3 compiled with OCaml version 5.3.0
Flags passed to the configure script: --prefix=/usr --sysconfdir=/etc
--libdir=/usr/lib --enable-ocaml --enable-python --with-python=python3
--enable-opt
OCaml scripting support: yes
Python scripting support: yes
Syntax of regular expressions: Str
Debian stable.
I will test on Debian unstable also
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: array_size.h --]
[-- Type: text/x-c; name=array_size.h, Size: 907 bytes --]
/* CC0 (Public domain) - see LICENSE file for details */
#ifndef CCAN_ARRAY_SIZE_H
#define CCAN_ARRAY_SIZE_H
#include <hkl/ccan/ccan_config.h>
#include <hkl/ccan/build_assert/build_assert.h>
/**
* ARRAY_SIZE - get the number of elements in a visible array
* @arr: the array whose size you want.
*
* This does not work on pointers, or arrays declared as [], or
* function parameters. With correct compiler support, such usage
* will cause a build error (see build_assert).
*/
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + _array_size_chk(arr))
#if HAVE_BUILTIN_TYPES_COMPATIBLE_P && HAVE_TYPEOF
/* Two gcc extensions.
* &a[0] degrades to a pointer: a different type from an array */
#define _array_size_chk(arr) \
BUILD_ASSERT_OR_ZERO(!__builtin_types_compatible_p(typeof(arr), \
typeof(&(arr)[0])))
#else
#define _array_size_chk(arr) 0
#endif
#endif /* CCAN_ALIGNOF_H */
next prev parent reply other threads:[~2026-11-12 12:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 10:34 [cocci] Bug dans la parseur de coccinelle ? picca
2026-11-12 10:40 ` Julia Lawall
2026-11-12 10:47 ` picca
2026-11-12 12:12 ` Victor Gambier
2026-11-12 12:26 ` picca
2026-11-12 12:29 ` Victor Gambier
2026-11-12 12:36 ` picca [this message]
2026-11-12 14:10 ` picca
2026-11-12 14:43 ` Julia Lawall
2026-11-12 14:44 ` Julia Lawall
2026-11-12 12:36 ` Markus Elfring
2026-11-12 12:41 ` picca
2026-11-12 14:51 ` picca
2026-11-12 14:55 ` Julia Lawall
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=52f7e18cb3dfd61db7e9575c44353928@debian.org \
--to=picca@debian.org \
--cc=cocci@inria.fr \
--cc=julia.lawall@inria.fr \
--cc=victor.gambier@inria.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.