public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3745: bug in basic_string.tcc
@ 2001-07-21 16:36 Phil Edwards
  0 siblings, 0 replies; 4+ messages in thread
From: Phil Edwards @ 2001-07-21 16:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3745; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: alm@iis.fhg.de
Cc: gcc-gnats@gcc.gnu.org, spz@iis.fhg.de
Subject: Re: c++/3745: bug in basic_string.tcc
Date: Sat, 21 Jul 2001 19:32:16 -0400

 On Fri, Jul 20, 2001 at 09:04:42AM -0000, alm@iis.fhg.de wrote:
 > >Severity:       serious
 > >Description:
 > On line 630 of the basic_string.tcc file:
 >   __pos = std::min(__size - __n ,__pos);
 > 
 > should be:
 >  __pos = min(__size - __n ,__pos);
 > 
 > since the entire block is in the "namespace std {" scope.
 > This can lead to a compilation error.
 
 Perhaps I'm being dense, but I do not see how.  I have tried to make this
 function call fail to compile, but cannot.  Please give an example of such
 source code, showing why this is "serious".
 
 We could probably remove "std::" just to make it match with the rest of the
 file, but I would want to know why the qualifier is there in the first place.
 
 
 Thanks,
 Phil
 
 -- 
 Would I had phrases that are not known, utterances that are strange, in
 new language that has not been used, free from repetition, not an utterance
 which has grown stale, which men of old have spoken.
                                      - anonymous Egyptian scribe, c.1700 BC


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/3745: bug in basic_string.tcc
@ 2001-08-10  7:58 lerdsuwa
  0 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa @ 2001-08-10  7:58 UTC (permalink / raw)
  To: alm, gcc-bugs, gcc-prs, nobody, spz

Synopsis: bug in basic_string.tcc

State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Aug 10 07:58:08 2001
State-Changed-Why:
    This probably due to min defined as a macro somewhere in
    your code.  This conflicts with the template function min
    in the C++ library.  Simply #undef it should solve your
    problem.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3745&database=gcc


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/3745: bug in basic_string.tcc
@ 2001-07-23  0:56 Eric Allamanche
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Allamanche @ 2001-07-23  0:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3745; it has been noted by GNATS.

From: Eric Allamanche <alm@iis.fhg.de>
To: Phil Edwards <pedwards@disaster.jaj.com>
Cc: gcc-gnats@gcc.gnu.org, spz@iis.fhg.de
Subject: Re: c++/3745: bug in basic_string.tcc
Date: Mon, 23 Jul 2001 09:54:18 +0200

 Phil,
 
 thanks for your answer. The "serious" qualifier was due to the fact that
 I did not really paid attention to this field (sorry for that). Anyhow,
 we had some code which could not get compiled because of the mentionned
 issue. I will check if we can reproduce this error with a reduced code
 fragment.
 
 Eric
 
 Phil Edwards wrote:
 > 
 > On Fri, Jul 20, 2001 at 09:04:42AM -0000, alm@iis.fhg.de wrote:
 > > >Severity:       serious
 > > >Description:
 > > On line 630 of the basic_string.tcc file:
 > >   __pos = std::min(__size - __n ,__pos);
 > >
 > > should be:
 > >  __pos = min(__size - __n ,__pos);
 > >
 > > since the entire block is in the "namespace std {" scope.
 > > This can lead to a compilation error.
 > 
 > Perhaps I'm being dense, but I do not see how.  I have tried to make this
 > function call fail to compile, but cannot.  Please give an example of such
 > source code, showing why this is "serious".
 > 
 > We could probably remove "std::" just to make it match with the rest of the
 > file, but I would want to know why the qualifier is there in the first place.
 > 
 > Thanks,
 > Phil
 > 
 > --
 > Would I had phrases that are not known, utterances that are strange, in
 > new language that has not been used, free from repetition, not an utterance
 > which has grown stale, which men of old have spoken.
 >                                      - anonymous Egyptian scribe, c.1700 BC
 
 -- 
 ==================================================================
  Eric Allamanche                        mailto:alm@iis.fhg.de
  Fraunhofer Institut 
  Integrierte Schaltungen                Phone :+49 9131 776-322
  Dept. Audio-Multimedia                 Fax   :+49 9131 776-398
  Am Weichselgarten 3                    http://www.iis.fhg.de/amm  
  D-91058 Erlangen, Germany		
 ==================================================================


^ permalink raw reply	[flat|nested] 4+ messages in thread

* c++/3745: bug in basic_string.tcc
@ 2001-07-20  2:06 alm
  0 siblings, 0 replies; 4+ messages in thread
From: alm @ 2001-07-20  2:06 UTC (permalink / raw)
  To: gcc-gnats; +Cc: spz

>Number:         3745
>Category:       c++
>Synopsis:       bug in basic_string.tcc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 20 02:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     alm@iis.fhg.de
>Release:        unknown-1.0
>Organization:
>Environment:
Linux SuSE 7.2
>Description:
On line 630 of the basic_string.tcc file:
  __pos = std::min(__size - __n ,__pos);

should be:
 __pos = min(__size - __n ,__pos);

since the entire block is in the "namespace std {" scope.
This can lead to a compilation error. Furthermore, all other calls
to the "min" template are made without the namespace "std::" 
identifier.
>How-To-Repeat:

>Fix:
Just remove "std::" on line 630
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-08-10  7:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-21 16:36 c++/3745: bug in basic_string.tcc Phil Edwards
  -- strict thread matches above, loose matches on Subject: below --
2001-08-10  7:58 lerdsuwa
2001-07-23  0:56 Eric Allamanche
2001-07-20  2:06 alm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).