__SIZE_TYPE__ and friends out of specs

Neil Booth neil@daikokuya.demon.co.uk
Tue May 14 10:17:00 GMT 2002


Zack Weinberg wrote:-

> +  /* stddef.h needs to know these.  */
> +  builtin_define_with_value ("__SIZE_TYPE__", SIZE_TYPE);
> +  builtin_define_with_value ("__PTRDIFF_TYPE__", PTRDIFF_TYPE);
> +  builtin_define_with_value ("__WCHAR_TYPE__", WCHAR_TYPE);
> +  builtin_define_with_value ("__WINT_TYPE__", WINT_TYPE);

Two more nits.  I think the WCHAR one is best done as follows:

  builtin_define_with_value ("__WCHAR_TYPE__",
  			     IDENTIFIER_POINTER (wchar_type_node));

This ensures you DTRT with -fshort-wchar.

Also, would you poison the removed macros?

Thanks,

Neil.



More information about the Gcc-patches mailing list