public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* RE: bug in /usr/include/c++/3.4/bits/fstream.tcc
@ 2004-12-10  8:05 Jacob Schmidt Madsen
  0 siblings, 0 replies; 4+ messages in thread
From: Jacob Schmidt Madsen @ 2004-12-10  8:05 UTC (permalink / raw)
  To: gcc-bugs

please ignore the previous message. i was my mistake, since i had
include some work from another guy, who had "using namespace std" and
also defined a "min" and "max" - it causes a conflict.

sorry about the trouble!

-----Oprindelig meddelelse-----
Fra: gdr@integrable-solutions.net [mailto:gdr@integrable-solutions.net] 
Sendt: 9. december 2004 22:21
Til: Jacob Schmidt Madsen
Cc: gcc-bugs@gcc.gnu.org
Emne: Re: bug in /usr/include/c++/3.4/bits/fstream.tcc


"Jacob Schmidt Madsen" <JSMA@tdc.dk> writes:

| error:
| /usr/include/c++/3.4/bits/fstream.tcc: In member function `virtual
| typename std::basic_filebuf<_CharT, _Traits>::int_type
| std::basic_filebuf<_CharT, _Traits>::underflow()':
| /usr/include/c++/3.4/bits/fstream.tcc:277: error: expected
| unqualified-id before '(' token
| /usr/include/c++/3.4/bits/fstream.tcc: In member function `virtual
| std::streamsize std::basic_filebuf<_CharT, _Traits>::xsputn(const
| _CharT*, std::streamsize)':
| /usr/include/c++/3.4/bits/fstream.tcc:518: error: expected
| unqualified-id before '(' token
| 
| solution found at:
| http://gcc.gnu.org/ml/gcc-bugs/2004-07/msg02128.html
| 
| fix:
| change line 277 in /usr/include/c++/3.4/bits/fstream.tcc
| from: __ilen = std::min(__avail, __buflen);
| to: __ilen = min(__avail, __buflen);

I cannot see any reason why that would be a fix.

-- Gaby


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

* Re: bug in /usr/include/c++/3.4/bits/fstream.tcc
  2004-12-08 11:05 Jacob Schmidt Madsen
@ 2004-12-09 21:22 ` Gabriel Dos Reis
  0 siblings, 0 replies; 4+ messages in thread
From: Gabriel Dos Reis @ 2004-12-09 21:22 UTC (permalink / raw)
  To: Jacob Schmidt Madsen; +Cc: gcc-bugs

"Jacob Schmidt Madsen" <JSMA@tdc.dk> writes:

| error:
| /usr/include/c++/3.4/bits/fstream.tcc: In member function `virtual
| typename std::basic_filebuf<_CharT, _Traits>::int_type
| std::basic_filebuf<_CharT, _Traits>::underflow()':
| /usr/include/c++/3.4/bits/fstream.tcc:277: error: expected
| unqualified-id before '(' token
| /usr/include/c++/3.4/bits/fstream.tcc: In member function `virtual
| std::streamsize std::basic_filebuf<_CharT, _Traits>::xsputn(const
| _CharT*, std::streamsize)':
| /usr/include/c++/3.4/bits/fstream.tcc:518: error: expected
| unqualified-id before '(' token
| 
| solution found at:
| http://gcc.gnu.org/ml/gcc-bugs/2004-07/msg02128.html
| 
| fix:
| change line 277 in /usr/include/c++/3.4/bits/fstream.tcc
| from: __ilen = std::min(__avail, __buflen);
| to: __ilen = min(__avail, __buflen);

I cannot see any reason why that would be a fix.

-- Gaby


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

* Re: bug in /usr/include/c++/3.4/bits/fstream.tcc
@ 2004-12-08 11:22 Paolo Carlini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Carlini @ 2004-12-08 11:22 UTC (permalink / raw)
  To: JSMA, gcc-bugs

> solution found at:
> http://gcc.gnu.org/ml/gcc-bugs/2004-07/msg02128.html

Solution?!?
That PR is closed as INVALID for a reason and in fact nobody actually
removed those qualifiers from the library. The user code must be fixed
instead.

Thanks,
Paolo.


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

* bug in /usr/include/c++/3.4/bits/fstream.tcc
@ 2004-12-08 11:05 Jacob Schmidt Madsen
  2004-12-09 21:22 ` Gabriel Dos Reis
  0 siblings, 1 reply; 4+ messages in thread
From: Jacob Schmidt Madsen @ 2004-12-08 11:05 UTC (permalink / raw)
  To: gcc-bugs

error:
/usr/include/c++/3.4/bits/fstream.tcc: In member function `virtual
typename std::basic_filebuf<_CharT, _Traits>::int_type
std::basic_filebuf<_CharT, _Traits>::underflow()':
/usr/include/c++/3.4/bits/fstream.tcc:277: error: expected
unqualified-id before '(' token
/usr/include/c++/3.4/bits/fstream.tcc: In member function `virtual
std::streamsize std::basic_filebuf<_CharT, _Traits>::xsputn(const
_CharT*, std::streamsize)':
/usr/include/c++/3.4/bits/fstream.tcc:518: error: expected
unqualified-id before '(' token

solution found at:
http://gcc.gnu.org/ml/gcc-bugs/2004-07/msg02128.html

fix:
change line 277 in /usr/include/c++/3.4/bits/fstream.tcc
from: __ilen = std::min(__avail, __buflen);
to: __ilen = min(__avail, __buflen);

and...

change line 518 in /usr/include/c++/3.4/bits/fstream.tcc
from: const streamsize __limit = std::min(__chunk, __bufavail);
to: const streamsize __limit = min(__chunk, __bufavail);

> gcc -v
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.2 [FreeBSD] 20040728

OS:
FreeBSD 5.3-RELEASE


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

end of thread, other threads:[~2004-12-10  8:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-10  8:05 bug in /usr/include/c++/3.4/bits/fstream.tcc Jacob Schmidt Madsen
  -- strict thread matches above, loose matches on Subject: below --
2004-12-08 11:22 Paolo Carlini
2004-12-08 11:05 Jacob Schmidt Madsen
2004-12-09 21:22 ` Gabriel Dos Reis

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).