All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Stefaniuc <mstefani@redhat.com>
To: Josh Triplett <josh@freedesktop.org>
Cc: linux-sparse@vger.kernel.org
Subject: Re: Ignore the cdecl and stdcall attributes for now.
Date: Wed, 16 May 2007 13:19:26 +0200	[thread overview]
Message-ID: <464AE8BE.9020805@redhat.com> (raw)
In-Reply-To: <464AA57B.3010205@freedesktop.org>

[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]

Josh Triplett wrote:
> Michael Stefaniuc wrote:
>> Wine uses the __stdcall__ attribute extensively. The effects of the
>> patch on a sparse run on the Wine code are:
>> - Removes 143000 "attribute '__stdcall__': unknown attribute" errors.
>> - Removes 116 "attribute '__cdecl__': unknown attribute" errors.
>> - Reduces the amount of "error: too many errors" from 1992 to 1459.
>>
>> Signed-off-by: Michael Stefaniuc <mstefani@redhat.com>
> 
> Applied, along with a test case.  Thanks!
Thanks.

> I'd love to see the results you get with Wine; in particular, I'd love to see
> and fix any parse errors.  Would you consider posting a build log somewhere
I thankfully accept your offer :)

> with latest Sparse from Git?
The output is still big. But i have a test case for the next big problem 
generator in Wine. It's attached as a git patch to 
validate/calling-convention-attributes.c (I can send it separately to 
the linux-sparse mailing list if you want). Sparse gives:
calling-convention-attributes.c:7:12: error: Expected ; at end of 
declaration
calling-convention-attributes.c:7:12: error: got f5ptr

> Did you integrate Sparse into the Wine build system, or did you use CC=cgcc?
Crude hack in my git tree to Make.rules adding a sparse call to the .c 
=> .o build rule. Tried to see how the Kernel build system integrates 
that and my  head started to smoke ... . I do not plan to send it 
upstream for the moment.

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart

[-- Attachment #2: 0001-Add-test-for-typedef-on-pointer-to-function-with-std.patch --]
[-- Type: text/x-patch, Size: 937 bytes --]

From a31ddd057217701c239677f820fa4bb5456ab079 Mon Sep 17 00:00:00 2001
From: Michael Stefaniuc <mstefani@redhat.com>
Date: Wed, 16 May 2007 13:12:42 +0200
Subject: [PATCH] Add test for typedef on pointer to function with stdcall attribute.


Signed-off-by: Michael Stefaniuc <mstefani@redhat.com>
---
 validation/calling-convention-attributes.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/validation/calling-convention-attributes.c b/validation/calling-convention-attributes.c
index 0546754..1bbe575 100644
--- a/validation/calling-convention-attributes.c
+++ b/validation/calling-convention-attributes.c
@@ -2,3 +2,6 @@ extern void __attribute__((cdecl)) f1(void);
 extern void __attribute__((__cdecl__)) f2(void);
 extern void __attribute__((stdcall)) f3(void);
 extern void __attribute__((__stdcall__)) f4(void);
+
+typedef void (__attribute__((__stdcall__)) *f5)(void);
+typedef f5 f5ptr;
-- 
1.5.0.6


  reply	other threads:[~2007-05-16 11:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15 22:05 Ignore the cdecl and stdcall attributes for now Michael Stefaniuc
2007-05-16  6:32 ` Josh Triplett
2007-05-16 11:19   ` Michael Stefaniuc [this message]
2007-05-16 12:46     ` Sam Ravnborg
2007-05-22 22:39     ` Josh Triplett
     [not found]   ` <46520647.9090802@redhat.com>
     [not found]     ` <4652819D.4040101@freedesktop.org>
2007-05-22 14:41       ` Michael Stefaniuc
2007-05-22 20:32         ` Josh Triplett
2007-05-22 23:44           ` Running sparse on the Wine code (Was: Re: Ignore the cdecl and stdcall attributes for now.) Michael Stefaniuc
2007-05-23  2:01             ` Josh Triplett

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=464AE8BE.9020805@redhat.com \
    --to=mstefani@redhat.com \
    --cc=josh@freedesktop.org \
    --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 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.