diff mbox

Adding default for m64/m32 handle

Message ID CANeU7Qk_V12Db0a2HD9nQEfMD-i-xE84kc1T4-H+xM2SBAMSyg@mail.gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Christopher Li July 26, 2012, 10:28 a.m. UTC
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

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dan Carpenter July 26, 2012, 11:14 a.m. UTC | #1
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

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christopher Li July 26, 2012, 4:57 p.m. UTC | #2
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
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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
        }