Submitted as bug 3013956.
If you don't like wading through preprocessed #include <string> code,
skip to the very end of the attached file.
Andrew
--- The simple version of the file for anyone interested:
#include <string>
using std::string;
// Here we handle '\n' correctly; dot needs "\\\\n". We append "\\n" so
that each line ends with \n
string expand_char (string input_stringB, char which_char, string
which_replace)
{
for (unsigned int i = 0; i < input_stringB.size (); i += 1)
if (input_stringB [i] == which_char)
{
input_stringB.erase (i, 1);
input_stringB.insert (i, which_replace);
i += which_replace.size () - 1;
}
return input_stringB;
}
-----
On Tuesday, July 30, 2002, at 02:23 PM, Stuart Hastings wrote:
>
> On Tuesday, Jul 30, 2002, at 13:22 US/Pacific, Andrew Begel wrote:
>
>> I'm using gcc3-1153. Is it a bug if when compiling a c++ file with
>> -dynamic -g -fno-common, that the .stabs debug information put a
>> symbol into the common section? When I take out -g, my common symbol
>> goes away (noticed when linking the .o into a dynamiclib). It's a
>> debug symbol describing the input to a C function.
>>
>> Here's the symbol from the assembly code generated by the compiler:
>> .stabs "input_stringC:v(1,1)",36,0,80,268
>>
>
> Hello,
>
> Could you create a small testcase, with two sets of commandline options
> ("with -blah, it's correct; with -bleep, it's wrong") ?
>
> Thanks in advance,
>
> stuart hastings
>
>
-----------
Andrew Begel
Ph.D. Candidate
Computer Science Division
University of California, Berkeley