is this a string bug?
Jason Merrill
jason@cygnus.com
Wed Nov 26 01:58:00 GMT 1997
>>>>> Kate Hedstrom <kate@ahab.rutgers.edu> writes:
> In chapter 5 of the new Stroustrup edition there is the program
> shown below. It produces:
>> ahab% a.out
>> aa bb aa bb aa cc <return><ctrl-D>
>> cc: 6
Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
* typeck2.c (digest_init): Make copies where appropriate.
Index: typeck2.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/cp/typeck2.c,v
retrieving revision 1.115
diff -c -r1.115 typeck2.c
*** typeck2.c 1997/10/15 07:40:20 1.115
--- typeck2.c 1997/11/26 09:52:01
***************
*** 743,748 ****
--- 743,751 ----
init = DECL_INITIAL (init);
else if (TREE_READONLY_DECL_P (init))
init = decl_constant_value (init);
+ else if (IS_AGGR_TYPE (type) && TYPE_NEEDS_CONSTRUCTING (type))
+ init = ocp_convert (type, init, CONV_IMPLICIT|CONV_FORCE_TEMP,
+ LOOKUP_NORMAL);
return init;
}
More information about the Gcc-bugs
mailing list