This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C++ bug with PCC_STATIC_STRUCT_RETURN
- To: gcc at gcc dot gnu dot org
- Subject: C++ bug with PCC_STATIC_STRUCT_RETURN
- From: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Date: Sat, 27 Jan 01 23:02:13 PST
Hi there,
I think I have found a bug in the C++ front end in the code #ifdefed on
PCC_STATIC_STRUCT_RETURN and thus used only on the great old holy original
ports (VAX, m68k, etc.) but not on any of the "modern" ones.
This fragment in cp/semantics.c:
#ifdef PCC_STATIC_STRUCT_RETURN
if (!AGGR_INIT_VIA_CTOR_P (aggr_init_expr) && aggregate_value_p (type))
{
int old_ac;
flag_access_control = 0;
call_expr = build_aggr_init (slot, call_expr, LOOKUP_ONLYCONVERTING);
flag_access_control = old_ac;
copy_from_buffer_p = 1;
}
#endif
throws cc1plus into an infinite recursion of walk_tree when compiling a call to
a function returning a structure. However, not being a C++ front end hacker I'm
having a hard time figuring out exactly what goes wrong. Could anyone working
on the C++ front end please look at the above #ifdefed code and see if there is
some obvious problem with it? TIA.
--
Michael Sokolov
Public Service Agent
International Engineering and Science Task Force
1351 VINE AVE APT 27 Phone: +1-714-738-5409
FULLERTON CA 92833-4291 USA (home office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP)