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: Fix c99 builtins


> On Sat, 9 Nov 2002, Jan Hubicka wrote:
> 
> > Currently we recognize c99 builtins with the __builtin* name only and fallback
> > into __builtin_* call, while in non-c99 mode we recognize them and fallback
> > into * call.
> 
> They're meant to be recognised with both names except in strict C90/C94
> mode (and fall back where appropriate).  I think what you want is "true,
> true, !flag_isoc99" rather than the current "true, !flag_isoc99, true" or
I see I tought we do not want them to be recognized in the earlier modes.

Currently we recognize c99 builtins with the __builtin* name only and fallback
into __builtin_* call, while in non-c99 mode we recognize them and fallback
into * call.

Fixed by the attached patch.  Now it is recognized as __builtin* in nonc99 and
* in c99, fallbacked always into *.
Sat Nov  9 20:51:13 CET 2002  Jan Hubicka  <jh@suse.cz>
	* builtins.def (DEF_C99_BUILTIN): Fix.
Index: builtins.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.def,v
retrieving revision 1.38
diff -c -3 -p -r1.38 builtins.def
*** builtins.def	29 Sep 2002 13:16:42 -0000	1.38
--- builtins.def	9 Nov 2002 19:50:57 -0000
*************** Software Foundation, 59 Temple Place - S
*** 114,120 ****
  #undef DEF_C99_BUILTIN					
  #define DEF_C99_BUILTIN(ENUM, NAME, TYPE)		\
    DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
!    	       true, !flag_isoc99, true, ATTR_NOTHROW_LIST)
  
  /* Like DEF_LIB_BUILTIN, except that the function is expanded in the
     front-end.  */
--- 114,120 ----
  #undef DEF_C99_BUILTIN					
  #define DEF_C99_BUILTIN(ENUM, NAME, TYPE)		\
    DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
!    	       true, true, !flag_isoc99, ATTR_NOTHROW_LIST)
  
  /* Like DEF_LIB_BUILTIN, except that the function is expanded in the
     front-end.  */


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