This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: need help with builtin function prototypes
- From: Ian Lance Taylor <iant at google dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 09 Aug 2007 16:40:51 -0700
- Subject: Re: need help with builtin function prototypes
- References: <200708092130.l79LUT2h016740@greed.delorie.com>
DJ Delorie <dj@redhat.com> writes:
> Is there a trick to this? I need this type of functionality because
> some builtins modify multiple values, so a simple return value is
> insufficient, plus this worked with older versions of gcc so our users
> are used to it syntax-wise.
I've never found a good solution for builtins which return multiple
values. The best approximation I found was to return a magic
structure, and to provide other builtin functions to get the values
from the structure (defining the structure in the backend was
problematic when using C++).
It doesn't sound like that will help you, though, if you are stuck
with the existing syntax.
Ian