From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@inria.fr
Subject: [cocci] Adding function attributes with SmPL?
Date: Mon, 16 Jan 2023 12:37:22 +0100 [thread overview]
Message-ID: <cd35c301-c1fc-80d2-c3b4-bf37a5dca522@web.de> (raw)
Hello,
I would occasionally like to adjust function attributes.
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Common-Function-Attributes.html
Thus I have tried another tiny script variant out for the semantic patch language
(according to the software combination “Coccinelle 1.1.1”).
@addition@
@@
int must_be_checked(...)
+__attribute__ ((warn_unused_result))
;
Unfortunately, I stumbled on the following display.
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --parse-cocci add_warn_unused_result1.cocci
…
plus: parse error:
File "add_warn_unused_result1.cocci", line 4, column 1, charpos = 41
around = '__attribute__',
whole content = +__attribute__ ((warn_unused_result))
Can the software tool be extended accordingly?
Regards,
Markus
next reply other threads:[~2023-01-16 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 11:37 Markus Elfring [this message]
2023-01-16 17:33 ` [cocci] Adding function attributes with SmPL? Julia Lawall
2023-01-17 12:24 ` Markus Elfring
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=cd35c301-c1fc-80d2-c3b4-bf37a5dca522@web.de \
--to=markus.elfring@web.de \
--cc=cocci@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 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).