* re: Adding default for m64/m32 handle
@ 2012-07-26 7:45 Dan Carpenter
2012-07-26 10:28 ` Christopher Li
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2012-07-26 7:45 UTC (permalink / raw)
To: Christopher Li; +Cc: linux-sparse
Hi Chris,
The patch 7aa79f8401f0 "Adding default for m64/m32 handle" causes
a problem for variables called x86_64.
$ echo "unsigned char x86_64;" > test.c
$ ./sparse test.c
test.c:1:15: warning: missing identifier in declaration
test.c:1:15: error: Expected ; at the end of type declaration
test.c:1:15: error: got 1
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding default for m64/m32 handle
2012-07-26 7:45 Adding default for m64/m32 handle Dan Carpenter
@ 2012-07-26 10:28 ` Christopher Li
2012-07-26 11:14 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Li @ 2012-07-26 10:28 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-sparse
On Thu, Jul 26, 2012 at 12:45 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> Hi Chris,
>
> The patch 7aa79f8401f0 "Adding default for m64/m32 handle" causes
> a problem for variables called x86_64.
>
> $ echo "unsigned char x86_64;" > test.c
> $ ./sparse test.c
> test.c:1:15: warning: missing identifier in declaration
> test.c:1:15: error: Expected ; at the end of type declaration
> test.c:1:15: error: got 1
Are you suggesting we do some thing like this patch to remove the
define of x86_64?
Gcc does not seem to define x86_64.
Any objections?
Chris
diff --git a/lib.c b/lib.c
index b4d3944..bb814f2 100644
--- a/lib.c
+++ b/lib.c
@@ -372,8 +372,6 @@ static void handle_arch_m64_finalize(void)
size_t_ctype = &ulong_ctype;
ssize_t_ctype = &long_ctype;
#ifdef __x86_64__
- add_pre_buffer("#weak_define x86_64 1\n");
- add_pre_buffer("#weak_define __x86_64 1\n");
add_pre_buffer("#weak_define __x86_64__ 1\n");
#endif
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Adding default for m64/m32 handle
2012-07-26 10:28 ` Christopher Li
@ 2012-07-26 11:14 ` Dan Carpenter
2012-07-26 16:57 ` Christopher Li
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2012-07-26 11:14 UTC (permalink / raw)
To: Christopher Li; +Cc: linux-sparse
On Thu, Jul 26, 2012 at 03:28:26AM -0700, Christopher Li wrote:
> On Thu, Jul 26, 2012 at 12:45 AM, Dan Carpenter
> <dan.carpenter@oracle.com> wrote:
> > Hi Chris,
> >
> > The patch 7aa79f8401f0 "Adding default for m64/m32 handle" causes
> > a problem for variables called x86_64.
> >
> > $ echo "unsigned char x86_64;" > test.c
> > $ ./sparse test.c
> > test.c:1:15: warning: missing identifier in declaration
> > test.c:1:15: error: Expected ; at the end of type declaration
> > test.c:1:15: error: got 1
>
> Are you suggesting we do some thing like this patch to remove the
> define of x86_64?
> Gcc does not seem to define x86_64.
>
> Any objections?
Thanks, that works.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding default for m64/m32 handle
2012-07-26 11:14 ` Dan Carpenter
@ 2012-07-26 16:57 ` Christopher Li
0 siblings, 0 replies; 4+ messages in thread
From: Christopher Li @ 2012-07-26 16:57 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-sparse
On Thu, Jul 26, 2012 at 4:14 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Thanks, that works.
OK, no objects so far. I will apply it then.
Thanks
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-26 16:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-26 7:45 Adding default for m64/m32 handle Dan Carpenter
2012-07-26 10:28 ` Christopher Li
2012-07-26 11:14 ` Dan Carpenter
2012-07-26 16:57 ` Christopher Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox