This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: stl_algo.h name conflict with gcc internal



Perhaps __op* should be added to BADNAMES. There appears to be some checks
for this in the c++ front-end (gcc/cp/pt.c) but it might be a good idea to
play it safe anyway.

In anycase, if this is to be changed, it should be changed for all the
cases:

<bkoz@milou.cygnus.com> {/horton/bkoz/src.libstdc++/stl/bits}
% grep "__op" *
grep: CVS: Is a directory
stl_algo.h:                      _OutputIter __result, _UnaryOperation
__opr) {stl_algo.h:    *__result = __opr(*__first);
stl_numeric.h:_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr)
stl_numeric.h:    return identity_element(__opr);
stl_numeric.h:      __x = __opr(__x, __x);
stl_numeric.h:      __x = __opr(__x, __x);
stl_numeric.h:        __result = __opr(__result, __x);
stl_numeric.h:inline _Tp power(_Tp __x, _Integer __n, _MonoidOperation __opr)
stl_numeric.h:  return __power(__x, __n, __opr);


On Wed, 20 Oct 1999, Petter Urkedal wrote:
> The name `__opr' means `operator long double' in gcc name
> mangling.  The use of `__opr' as a function parameter in
> stl_algo.h has now and then caused an obscure error message for
> a long time (also in v2).  I suggest the following change.

Do you have any example code that demonstrates this?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]