This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CPP built-in cleanup for NetBSD SPARC targets


Jason R Thorpe wrote:

> +#define TARGET_OS_CPP_BUILTINS()                       \
> +  do                                                   \
> +    {                                                  \
> +      NETBSD_OS_CPP_BUILTINS_ELF();                    \
> +      if (TARGET_ARCH64)                               \
> +       {                                               \
> +         NETBSD_OS_CPP_BUILTINS_LP64();                \
> +         builtin_define ("__sparc64__");               \
> +         builtin_define ("__sparc_v9__");              \
> +       }                                               \
> +      else                                             \
> +       builtin_define ("__sparc");                     \
> +      builtin_define ("__sparc__");                    \
> +    }                                                  \
> +  while (0)

Are the braces really correct on that else clause?  You only define __sparc
for 32-bit SPARC, but you define __sparc__ for all SPARC platforms?

If this is really what you meant (and it seems surprising), some explicit
braces, and a comment explaining why, would probably be helpful.

-- 
Jonathan Lennox
lennox@cs.columbia.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]