--- Additional Comments From bangerth at dealii dot org 2004-11-02 16:10 ---
I don't want to have these symbols not mangled (they need indeed be
mangled and randomized), the problem is that the randomness is sometimes
not enough. See PR 9393 for a case that would have been solved with
--- Additional Comments From giovannibajo at libero dot it 2004-11-02 11:55
---
(In reply to comment #7)
> This point has been discussed in a number of PRs already. I maintain
> my position that gcc could invoke the as-if rule to give these functions
> internal linkage if they aren't
--- Additional Comments From TazForEver at dlfp dot org 2004-11-02 09:21 ---
>> Alternatively, why don't you simply use "static"?
because everybody tells me that 'static' is deprecated in favor of 'namespace{}'
>> gcc could invoke the as-if rule to give these functions internal linkage
--- Additional Comments From bangerth at dealii dot org 2004-11-02 01:53 ---
This point has been discussed in a number of PRs already. I maintain
my position that gcc could invoke the as-if rule to give these functions
internal linkage if they aren't taken as template parameters. Since
--- Additional Comments From giovannibajo at libero dot it 2004-11-02 01:22
---
It is not exactly a G++ choice. This is what the ISO/ANSI C++ International
Standard mandates. I suggest you to post a mail to the newsgroup
comp.lang.c++.moderated or to comp.std.c++ to enquire an explanat
--- Additional Comments From TazForEver at dlfp dot org 2004-11-02 00:48 ---
i understand your point of view though i'm not happy with g++ behaviour. A
function with external linkage that can't be called seems like an oxymoron to
me. This makes my library very big. i had to mark a lot of
--- Additional Comments From giovannibajo at libero dot it 2004-11-02 00:19
---
GCC is not allowed to remove the definition of a function with external
linkage. The fact that nobody will be able to call it because it is in an
anonymous namespace it is irrelevant.
--
http://gcc.gnu.
--- Additional Comments From TazForEver at dlfp dot org 2004-11-02 00:10 ---
of course. but if they are not ? they should be optimize, no ?
if g++ inlines three(), why does it remove three() global definition if it's
never used ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18267
--- Additional Comments From giovannibajo at libero dot it 2004-11-01 23:52
---
Names declared in anonymous namespaces do not get internal linkage by default.
In fact, they can be used as template non-type arguments (names with internal
linkage cannot be used in such contexts).
--
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-01 19:05
---
The main reason IIRC for this is because C++ and export templates (even though we
don't implement
export yet).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18267
10 matches
Mail list logo