char constant?
Chris Torek
chris at mimsy.UUCP
Thu Apr 21 08:22:37 AEST 1988
In article <2569 at umd5.umd.edu> chris at trantor.umd.edu (I, using another
machine over the weekend since this one had a bad cache address board) wrote:
>[PCC's] method of handling anonymous aggregates, while expedient (the
>compiler never carries more than one `thing' in its `head'), has
>several unpleasant side effects. ... Another is that
> char *p1 = "hello", *p2 = "hello";
>generates two separate strings that have the same text .... [This] can
>be cured without changing the basic anonymous aggregate string builder ....
Oops. This is almost absurd. One could fix it in /lib/c2, perhaps, or
in a separate utility specially constructed for hacking over `.data 1'
constructs, but to do it in the compiler requires either backing up
the output file, or `carrying the string in its head' (perhaps in a
temporary file).
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.lang.c
mailing list