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: Update PA to use TARGET_CPU_CPP_BUILTINS and TARGET_OS_CPP_BUILTINS


John David Anglin wrote:-

> +#undef TARGET_OS_CPP_BUILTINS
> +#define TARGET_OS_CPP_BUILTINS()				\
> +  do								\
> +    {								\
> +	builtin_assert ("system=hiux");				\
> +	builtin_assert ("system=unix");				\
> +	builtin_define ("__hp9000s800");			\
> +	builtin_define ("__hp9000s800__");			\
> +	builtin_define ("__hiux");				\
> +	builtin_define ("__hiux__");				\
> +	builtin_define ("__unix");				\
> +	builtin_define ("__unix__");				\
> +	builtin_define ("__H3050R");				\
> +	builtin_define ("__H3050RX");				\
> +	if (c_language == clk_cplusplus)			\
> +	  {							\
> +	    builtin_define ("_HIUX_SOURCE");			\
> +	    builtin_define ("_INCLUDE_LONGLONG");		\
> +	  }							\
> +	else if (!flag_iso)					\
> +	  {							\
> +	    builtin_define ("_HIUX_SOURCE");			\
> +	    if (preprocessing_trad_p ())			\
> +	      {							\
> +		builtin_define ("hp9000s800");			\
> +		builtin_define ("hppa");			\
> +		builtin_define ("hiux");			\
> +		builtin_define ("unix");			\

You might not want to bother, but special-casing these 4 for C++
is probably not worth it, and to be consistent with other ports
just do a

    builin_define_std ("unix")
    etc.

at the do level, getting rid of the two duplications for each case
that would then be left.

Neil.


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