public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* __builtin_constant_p in C++
@ 1997-09-26  2:26 Andreas Schwab
  0 siblings, 0 replies; only message in thread
From: Andreas Schwab @ 1997-09-26  2:26 UTC (permalink / raw)
  To: egcs

The C++ compiler declares __builtin_constant_p as `int (int)'.  This leads
to spurious warnings when called with a char* which is the other usefull
type besides numeric types.  But it actually accepts any kind of type,
similar to __builtin_classify_type.


1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* decl.c (init_decl_processing): Declare __builtin_constant_p as
	accepting any kind of type, not only int.

*** egcs-970922/gcc/cp/decl.c.~1~	Wed Sep 24 19:02:42 1997
--- egcs-970922/gcc/cp/decl.c	Thu Sep 25 12:47:29 1997
*************** init_decl_processing ()
*** 5093,5099 ****
    else
      delta_type_node = short_integer_type_node;
  
!   builtin_function ("__builtin_constant_p", int_ftype_int,
  		    BUILT_IN_CONSTANT_P, NULL_PTR);
  
    builtin_return_address_fndecl
--- 5093,5099 ----
    else
      delta_type_node = short_integer_type_node;
  
!   builtin_function ("__builtin_constant_p", default_function_type,
  		    BUILT_IN_CONSTANT_P, NULL_PTR);
  
    builtin_return_address_fndecl

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-09-26  2:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-26  2:26 __builtin_constant_p in C++ Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).