[Patch] libstdc++/16612
Phil Edwards
phil@codesourcery.com
Mon Sep 27 21:08:00 GMT 2004
Hi Paolo! Thanks for working so hard on this stuff.
If the stop-gap measure is going to take the form of a configury switch,
I would request two changes:
> dnl
> +dnl Check for whether a fully dynamic basic_string implementation should be
> +dnl turned on (mostly useful together with shared_allocator).
> +dnl
> +dnl --enable-fully-dynamic-string defines _GLIBCXX_FULLY_DYNAMIC_STRING
> +dnl --disable-fully-dynamic-string leaves _GLIBCXX_FULLY_DYNAMIC_STRING undefined
> +dnl + Usage: GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING[(DEFAULT)]
> +dnl Where DEFAULT is either `yes' or `no'.
> +dnl
> +AC_DEFUN([GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING], [
> + GLIBCXX_ENABLE(fully-dynamic-string,$1,,[enables fully dynamic basic_string])
The autoconf macro description ("Check for...") and the --help output string
are somewhat redundant and uninformative, given the name of the option.
That is, I expect "--enable-foo" to enable foo; a help string that says
"this enables foo" kind of falls short. :-)
If they said something about "empty strings in per-process static memory,"
that would probably be enough.
> + <dt><code>--enable-fully-dynamic-string </code></dt>
> + <dd><p>This option enables a special version of basic_string avoiding
> + the optimization that allocates empty objects in static memory.
> + Mostly useful together with shared memory allocators.
> + </p>
> + </dd>
Could this, and maybe the autoconf macro description, either mention the PR
which started the whole thing, and/or link into the mailing list archives?
As it stands, a user reading these descriptions might legitimately wonder,
"under what conditions would I use this option, and do I need to use it now?"
If this is intended to be a temporary solution, that would probably be
mentioned as well.
What do you think?
Phil
--
AI.cpp:33241: warning: You wrote 'neurons.merge(solution1, solution2)",
AI.cpp:33241: you probably MEANT "neurons->merge(solution1, solution2)",
AI.cpp:33241: but there is a MUCH better way to implement this whole
AI.cpp:33241: function; doing that instead.
More information about the Libstdc++
mailing list