This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
type argument in FUNCTION_ARG macro
- From: John Lu <jlu at lsil dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 2 Dec 2002 14:50:58 -0600 (CST)
- Subject: type argument in FUNCTION_ARG macro
- Reply-to: John Lu <jlu at lsil dot com>
Hi,
I'm working on an architecture where the
calling convention depends on the type of
the parameter (i.e. pointers and non-pointers
are passed differently). I've implemented this
difference by using the POINTER_TYPE_P() macro
on the type argument to the FUNCTION_ARG macro.
I'm having a problem with this approach with
the memcpy function. If the function is
explicitly called, the above approach works
fine, but when this function is invoked as a
library function, the type argument to the FUNCTION_ARG()
macro will be NULL. Thus, the pointer parameters
are not passed as pointers. Any ideas on how to
get around this problem?
Thanks,
John Lu