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]

[C++ PATCH] Fix a builtin function problem



Hi

Certain builtin functions, especially strlen, were not 
properly expanded by the C++ frontend.  I found that
they are handled properly in build_over_call.  However,
its companion build_function_call_real lacks the call
to fold() to expand builtins.  The patch below fixes
this.

Tested on i586-pc-linux-gnu, OK to install?

--Kriang

2001-01-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>

	* typeck.c (build_function_call_real): Call fold on the CALL_EXPR.

*** gcc-old/gcc/cp/typeck.c	Thu Dec 28 17:05:52 2000
--- gcc-new/gcc/cp/typeck.c	Sun Jan 14 22:54:50 2001
*************** build_function_call_real (function, para
*** 3071,3077 ****
      }
  
    /* C++ */
!   result = build_call (function, coerced_params);
    value_type = TREE_TYPE (result);
  
    if (require_complete)
--- 3071,3077 ----
      }
  
    /* C++ */
!   result = fold (build_call (function, coerced_params));
    value_type = TREE_TYPE (result);
  
    if (require_complete)


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