public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/12065] New: Strange fpos arithmetic.
@ 2003-08-26 13:24 peturr02 at ru dot is
2003-08-26 13:26 ` [Bug libstdc++/12065] " peturr02 at ru dot is
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: peturr02 at ru dot is @ 2003-08-26 13:24 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12065
Summary: Strange fpos arithmetic.
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peturr02 at ru dot is
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
fpos::operator+ and fpos::operator- are not declared const. Furthermore, there
is no operator- taking two arguments of type fpos. This combined with
fpos::operator streamoff() causes some really weird behaviour.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/12065] Strange fpos arithmetic.
2003-08-26 13:24 [Bug libstdc++/12065] New: Strange fpos arithmetic peturr02 at ru dot is
@ 2003-08-26 13:26 ` peturr02 at ru dot is
2003-10-16 22:38 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: peturr02 at ru dot is @ 2003-08-26 13:26 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12065
------- Additional Comments From peturr02 at ru dot is 2003-08-26 13:26 -------
Created an attachment (id=4653)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4653&action=view)
Test case
Here is the output I get from running this program:
typeid(p) = std::fpos<__mbstate_t>
typeid(q) = std::fpos<__mbstate_t>
typeid(o) = l
typeid(p + o) = std::fpos<__mbstate_t>
typeid(q + o) = l
typeid(p - o) = std::fpos<__mbstate_t>
typeid(q - o) = l
typeid(p - q) = std::fpos<__mbstate_t>
typeid(q - p) = l
Note how the type of the result changes depending on only the constness of
the arguments.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/12065] Strange fpos arithmetic.
2003-08-26 13:24 [Bug libstdc++/12065] New: Strange fpos arithmetic peturr02 at ru dot is
2003-08-26 13:26 ` [Bug libstdc++/12065] " peturr02 at ru dot is
@ 2003-10-16 22:38 ` cvs-commit at gcc dot gnu dot org
2003-10-16 22:42 ` pinskia at gcc dot gnu dot org
2003-10-17 18:48 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-16 22:38 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12065
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-10-16 22:38 -------
Subject: Bug 12065
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: bkoz@gcc.gnu.org 2003-10-16 22:37:54
Modified files:
libstdc++-v3 : ChangeLog acinclude.m4 aclocal.m4 configure
configure.ac configure.host
libstdc++-v3/config/io: basic_file_stdio.cc basic_file_stdio.h
c_io_stdio.h
libstdc++-v3/include: Makefile.am Makefile.in
libstdc++-v3/include/bits: char_traits.h fstream.tcc sstream.tcc
libstdc++-v3/include/std: std_iosfwd.h
libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char: 1-in.cc
1-io.cc
1-out.cc
2-in.cc
2-io.cc
2-out.cc
libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char: 1-in.cc
1-io.cc
1-out.cc
2-in.cc
2-io.cc
2-out.cc
libstdc++-v3/testsuite/27_io/basic_istream/seekg/char: 2.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char: 1.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char: 1.cc
libstdc++-v3/testsuite/27_io/fpos/mbstate_t: 3.cc
libstdc++-v3/testsuite/27_io/objects/char: 10.cc
Added files:
libstdc++-v3/include/bits: postypes.h
libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char:
11543.cc
libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t:
11543.cc
libstdc++-v3/testsuite/27_io/fpos: 11450.cc
libstdc++-v3/testsuite/27_io/fpos/mbstate_t: 12065.cc 4_neg.cc
libstdc++-v3/testsuite/27_io/types: 3.cc
Removed files:
libstdc++-v3/config/os/generic: fpos.h
libstdc++-v3/config/os/gnu-linux: fpos.h
Log message:
2003-10-16 Petur Runolfsson <peturr02@ru.is>
PR libstdc++/8610
PR libstdc++/11450
PR libstdc++/11543
PR libstdc++/12065
* config/io/basic_file_stdio.cc (__basic_file::seekoff):
Change return value from streampos to streamoff.
(__basic_file::seekpos): Delete.
* config/io/basic_file_stdio.h: Same.
* config/io/c_io_stdio.h: Remove streamoff and wstreamsize typedefs.
* include/Makefile.am (bits_headers): Add bits/postypes.h.
* include/bits/char_traits.h: Include bits/postypes.h instead of
bits/fpos.h.
* include/bits/fstream.tcc (basic_filebuf::open,
basic_filebuf::pbackfail): Don't use < or >= to compare pos_type
values, use == and != instead.
(basic_filebuf::_M_seek): Use explicit conversion from streamoff
to pos_type.
(basic_filebuf::imbue): Don't use ! on pos_type values, use
== instead. Don't use __check_facet(_M_codecvt) unless is_open().
* include/bits/postypes.h: New file.
Add __streamoff_base_type typedef, streamsize.
(streamoff, streampos, wstreampos): Define typedefs, with
streamoff defined as...
(streamoff): New class. Document implementation defined
aspects.
(fpos): New implementation. Document implementation defined
aspects.
* include/bits/sstream.tcc (basic_stringbuf::seekpos): Use
explicit conversion from pos_type to off_type.
* include/std/std_iosfwd.h: Include bits/postypes.h instead
of bits/fpos.h.
* testsuite/27_io/basic_filebuf/seekoff/char/11543.cc: New test.
* testsuite/27_io/basic_filebuf/seekoff/wchar_t/11543.cc: New test.
* testsuite/27_io/fpos/11450.cc: New test.
* testsuite/27_io/fpos/mbstate_t/12065.cc: New test.
* testsuite/27_io/fpos/mbstate_t/4_neg.cc: New test.
* testsuite/27_io/types/3.cc: New test.
2003-10-16 Benjamin Kosnik <bkoz@redhat.com>
* configure.host: Remove fpos_include_dir.
* configure.ac: Remove FPOS_INC_SRCDIR.
* configure: Regenerate.
* acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Remove FPOS_H.
* aclocal.m4: Regenerate.
* include/Makefile.am (host_headers): Remove fpos.h.
(bits_headers): Add postypes.h.
* include/Makefile.in: Regenerate.
* config/os/gnu-linux/fposh: Remove.
* config/os/generic/fpos.h: Remove.
* testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Fixup.
* testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Same.
* testsuite/27_io/basic_istream/seekg/char/2.cc: Same.
* testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Same.
* testsuite/27_io/basic_stringbuf/seekpos/char/1.cc: Same.
* testsuite/27_io/fpos/mbstate_t/3.cc: Same.
* testsuite/27_io/objects/char/10.cc: Same.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2021&r2=1.2022
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/acinclude.m4.diff?cvsroot=gcc&r1=1.272&r2=1.273
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/aclocal.m4.diff?cvsroot=gcc&r1=1.286&r2=1.287
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.diff?cvsroot=gcc&r1=1.360&r2=1.361
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.ac.diff?cvsroot=gcc&r1=1.8&r2=1.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.host.diff?cvsroot=gcc&r1=1.17&r2=1.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/io/basic_file_stdio.cc.diff?cvsroot=gcc&r1=1.21&r2=1.22
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/io/basic_file_stdio.h.diff?cvsroot=gcc&r1=1.14&r2=1.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/io/c_io_stdio.h.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/os/generic/fpos.h.diff?cvsroot=gcc&r1=1.2&r2=NONE
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/os/gnu-linux/fpos.h.diff?cvsroot=gcc&r1=1.2&r2=NONE
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/Makefile.am.diff?cvsroot=gcc&r1=1.70&r2=1.71
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/Makefile.in.diff?cvsroot=gcc&r1=1.88&r2=1.89
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/postypes.h.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/char_traits.h.diff?cvsroot=gcc&r1=1.22&r2=1.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/fstream.tcc.diff?cvsroot=gcc&r1=1.102&r2=1.103
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/sstream.tcc.diff?cvsroot=gcc&r1=1.35&r2=1.36
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/std/std_iosfwd.h.diff?cvsroot=gcc&r1=1.10&r2=1.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/11543.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/11543.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/fpos/11450.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/12065.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/4_neg.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/3.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/objects/char/10.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/types/3.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/12065] Strange fpos arithmetic.
2003-08-26 13:24 [Bug libstdc++/12065] New: Strange fpos arithmetic peturr02 at ru dot is
2003-08-26 13:26 ` [Bug libstdc++/12065] " peturr02 at ru dot is
2003-10-16 22:38 ` cvs-commit at gcc dot gnu dot org
@ 2003-10-16 22:42 ` pinskia at gcc dot gnu dot org
2003-10-17 18:48 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-16 22:42 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12065
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-16 22:41 -------
Fixed for 3.4.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/12065] Strange fpos arithmetic.
2003-08-26 13:24 [Bug libstdc++/12065] New: Strange fpos arithmetic peturr02 at ru dot is
` (2 preceding siblings ...)
2003-10-16 22:42 ` pinskia at gcc dot gnu dot org
@ 2003-10-17 18:48 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-17 18:48 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12065
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-17 18:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-26 13:24 [Bug libstdc++/12065] New: Strange fpos arithmetic peturr02 at ru dot is
2003-08-26 13:26 ` [Bug libstdc++/12065] " peturr02 at ru dot is
2003-10-16 22:38 ` cvs-commit at gcc dot gnu dot org
2003-10-16 22:42 ` pinskia at gcc dot gnu dot org
2003-10-17 18:48 ` pinskia at gcc dot gnu dot org
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).