[Bug other/13873] gcc/longlong.h uses test for PPC

mfhaigh at acm dot org gcc-bugzilla@gcc.gnu.org
Fri Mar 5 05:28:00 GMT 2004


------- Additional Comments From mfhaigh at acm dot org  2004-03-05 05:28 -------
(In reply to comment #13)
> Subject: Re:  gcc/longlong.h uses test for PPC
> 
> Sorry, I take that back.  I see that TARGET_OS_CPP_BUILTINS defines
> __PPC.  It looks like the author of longlong.h didn't realize that
> builtin_define_std prepends __ to the string and thought it would be PPC
> instead of __PPC.  And for vxWorks, a check for __ppc should be added.
> 

Upon closer inspection, builtin_define_std will actually surround the macro with
leading and following __'s, if the macro is in the user namespace:

  /* If it was in user's namespace...  */
  if (p != buff + 2)
    {
      /* Define the macro with leading and following __.  */

The attached patch is against the 3.4 branch, and cleans up a couple of
testcases as well.  It does what you suggested-- use __ppc for vxWorks, and
change PPC to __PPC__.


Mark F. Haigh

2004-03-04 Mark F. Haigh <mfhaigh@acm.org>

   * longlong.h: PPC macro cleanup (fixes vxWorks targets)
   * gcc/testsuite/gcc.dg/20020103-1.c: PPC macro usage changed to __PPC__
   * gcc/testsuite/gcc.dg/20020919-1.c: Same as 20020103-1.c




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13873



More information about the Gcc-bugs mailing list