On Fri, 10 Dec 2021, Chenghua Xu wrote:

> +  /* Macros dependent on the C dialect.  */
> +  if (preprocessing_asm_p ())
> +    {
> +      builtin_define_std ("LANGUAGE_ASSEMBLY");
> +      builtin_define ("_LANGUAGE_ASSEMBLY");
> +    }
> +  else if (c_dialect_cxx ())
> +    {
> +      builtin_define ("_LANGUAGE_C_PLUS_PLUS");
> +      builtin_define ("__LANGUAGE_C_PLUS_PLUS");
> +      builtin_define ("__LANGUAGE_C_PLUS_PLUS__");
> +    }
> +  else
> +    {
> +      builtin_define_std ("LANGUAGE_C");
> +      builtin_define ("_LANGUAGE_C");
> +    }
> +  if (c_dialect_objc ())
> +    {
> +      builtin_define ("_LANGUAGE_OBJECTIVE_C");
> +      builtin_define ("__LANGUAGE_OBJECTIVE_C");
> +      /* Bizarre, but retained for backwards compatibility.  */
> +      builtin_define_std ("LANGUAGE_C");
> +      builtin_define ("_LANGUAGE_C");
> +    }
> +}

I think all of this should be removed.  It's a new architecture, there 
should be no need for any such macros for things that are not 
architecture-specific.  In general, be careful to remove anything in the 
port that is actually about the peculiarities of what was once done for 
compatibility with existing software for an old architecture (MIPS?) that 
you modelled the port on and that is not considered best practice for a 
new architecture where you can make a fresh start.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to