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: __SIZE_TYPE__ and friends out of specs


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.


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