This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH] Fix a builtin function problem
- To: gcc-patches at gcc dot gnu dot org
- Subject: [C++ PATCH] Fix a builtin function problem
- From: Kriang Lerdsuwanakij <lerdsuwa at users dot sourceforge dot net>
- Date: Mon, 15 Jan 2001 21:42:34 -0800 (PST)
- cc: ghazi at caip dot rutgers dot edu
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)