From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Dibyendu Majumdar <mobile@majumdar.org.uk>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: Potential issue with handling of va_arg()
Date: Fri, 31 Mar 2017 20:55:44 +0200 [thread overview]
Message-ID: <CAMHZB6GHpSktsr3V4UyQvMKWuCmpDekbd297QRcwAuq2tGkh+Q@mail.gmail.com> (raw)
In-Reply-To: <CACXZuxeBMkbp3zTpsFFdMXsuW+ea2z+HKNFAMdSbiuEcF-hvfg@mail.gmail.com>
On Fri, Mar 31, 2017 at 4:06 PM, Dibyendu Majumdar
<mobile@majumdar.org.uk> wrote:
> Hi,
>
> On 31 March 2017 at 14:47, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>> I am investigating a failure in this test:
>>
>> #include <stdarg.h>
>> #include <stdlib.h>
>> #include <stdio.h>
>>
>> void error_message(const char *fmt, ...) {
>> va_list argp;
>> va_start(argp, fmt);
>
> I think this might be because the macro __builtin_va_start() is being
> defined in sparse but this doesn't match what gets defined by gcc? I
> see this in sparse:
>
> #define __builtin_va_start(a,b) ((a) = (__builtin_va_list)(&(b)))
>
> but if I run above code through gcc then preprocessed output says:
>
> __builtin_va_start(argp, fmt);
>
Current support for vaarg is more faked than anything else.
There is just the minimum needed to be able to do correct parsing
of code using it but there is nothing behind it.
-- Luc
next prev parent reply other threads:[~2017-03-31 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 13:47 Potential issue with handling of va_arg() Dibyendu Majumdar
2017-03-31 14:06 ` Dibyendu Majumdar
2017-03-31 14:34 ` Dibyendu Majumdar
2017-03-31 18:55 ` Luc Van Oostenryck [this message]
2017-04-01 12:56 ` Dibyendu Majumdar
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=CAMHZB6GHpSktsr3V4UyQvMKWuCmpDekbd297QRcwAuq2tGkh+Q@mail.gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.org \
--cc=mobile@majumdar.org.uk \
/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 NNTP newsgroup(s).