🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.g++.lib.bug
2 messages
2 total messages Started by Antti Miettinen Sun, 03 Jan 1993 06:22
Libg++-2.3, gcc-2.3.3, IRIX 4.0.1, filebuf.C: filebuf: :do_write()
#346
Author: Antti Miettinen
Date: Sun, 03 Jan 1993 06:22
25 lines
1475 bytes
While compiling libg++-2.3 with gcc-2.3.3 (both configured with
mips-sgi-irix4) on Indigo with IRIX 4.0.1 I got the following warning:

>gcc -g -O -nostdinc++ -I. -I.. -I. -I./../src -I./../g++-include -c  filebuf.C
>filebuf.C: In method `int  filebuf::do_write (const char *, int)':
>filebuf.C:284: warning: negative value assigned to unsigned quantity

The piece of code that the warning refers to is the following:

>int filebuf::do_write(const char *data, int to_do)
>{
>    if (to_do == 0)
>	return 0;
>    if (xflags() & _S_IS_APPENDING) {
>	// On a system without a proper O_APPEND implementation,
>	// you would need to sys_seek(0, ios::end) here, but is
>	// is not needed nor desirable for Unix- or Posix-like systems.
>	// Instead, just indicate that offset (before and after) is
>	// unpredictable.
>	_fb._offset = -1;
>    }

_fb._offset is defined to be of type fpos_t in `strambuf.h' which is
unsigned in IRIX. This might not be anything serious but I thought it
was worth reporting.
Re: Libg++-2.3, gcc-2.3.3, IRIX 4.0.1, filebuf.C: filebuf: :do_write()
#348
Author: bothner
Date: Sun, 03 Jan 1993 07:34
6 lines
623 bytes
> _fb._offset is defined to be of type fpos_t in `strambuf.h'

I think it would be better to make it _G_off_t.

	--Per Bothner
Cygnus Support     bothner@cygnus.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads