public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf
       [not found] <bug-13860-4@http.gcc.gnu.org/bugzilla/>
@ 2014-05-08 18:30 ` redi at gcc dot gnu.org
  2014-05-08 18:32 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-05-08 18:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13860

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu May  8 18:30:14 2014
New Revision: 210231

URL: http://gcc.gnu.org/viewcvs?rev=210231&root=gcc&view=rev
Log:
    PR libstdc++/13860
    * include/std/fstream (basic_filebuf): Enforce requirements on traits.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/fstream


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

* [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf
       [not found] <bug-13860-4@http.gcc.gnu.org/bugzilla/>
  2014-05-08 18:30 ` [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf redi at gcc dot gnu.org
@ 2014-05-08 18:32 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-05-08 18:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13860

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.10.0

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The first test compiles now (it's implementation-defined whether it works or
not).

The other two fail a static assertion:

In file included from 2.cc:1:0:
/usr/include/c++/4.10.0/fstream: In instantiation of ‘class
std::basic_filebuf<char, MyTraits>’:
/usr/include/c++/4.10.0/fstream:809:22:   required from ‘class
std::basic_fstream<char, MyTraits>’
2.cc:10:37:   required from here
/usr/include/c++/4.10.0/fstream:84:7: error: static assertion failed: pos_type
must be fpos<state_type>
       static_assert(is_same<typename _Traits::pos_type,
       ^
>From gcc-bugs-return-451030-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu May 08 18:32:42 2014
Return-Path: <gcc-bugs-return-451030-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 10167 invoked by alias); 8 May 2014 18:32:42 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 10147 invoked by uid 48); 8 May 2014 18:32:38 -0000
From: "jgay at gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/61117] New: Manual uses term open source but should say free software
Date: Thu, 08 May 2014 18:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jgay at gnu dot org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-61117-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-05/txt/msg00722.txt.bz2
Content-length: 856

http://gcc.gnu.org/bugzilla/show_bug.cgi?ida117

            Bug ID: 61117
           Summary: Manual uses term open source but should say free
                    software
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jgay at gnu dot org

In the manual for libstdc++, FAQ has the following entry:

http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.license.what_restrictions

2.4. I see. So, what restrictions are there on programs that use the library?

None. We encourage such programs to be released as open source, but we won't
punish you or sue you if you choose otherwise.



In the above, the term "open source" should be replaced with "free software."


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

* [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf
  2004-01-25 18:50 [Bug libstdc++/13860] New: " peturr02 at ru dot is
                   ` (4 preceding siblings ...)
  2004-04-29 11:39 ` pcarlini at suse dot de
@ 2004-04-29 11:43 ` pcarlini at suse dot de
  5 siblings, 0 replies; 8+ messages in thread
From: pcarlini at suse dot de @ 2004-04-29 11:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-04-29 10:42 -------
... therefore, let's suspend it, for now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13860


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

* [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf
  2004-01-25 18:50 [Bug libstdc++/13860] New: " peturr02 at ru dot is
                   ` (3 preceding siblings ...)
  2004-03-11 17:43 ` bkoz at gcc dot gnu dot org
@ 2004-04-29 11:39 ` pcarlini at suse dot de
  2004-04-29 11:43 ` pcarlini at suse dot de
  5 siblings, 0 replies; 8+ messages in thread
From: pcarlini at suse dot de @ 2004-04-29 11:39 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-29 10:41:36
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13860


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

* [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf
  2004-01-25 18:50 [Bug libstdc++/13860] New: " peturr02 at ru dot is
                   ` (2 preceding siblings ...)
  2004-01-25 18:56 ` peturr02 at ru dot is
@ 2004-03-11 17:43 ` bkoz at gcc dot gnu dot org
  2004-04-29 11:39 ` pcarlini at suse dot de
  2004-04-29 11:43 ` pcarlini at suse dot de
  5 siblings, 0 replies; 8+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-03-11 17:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-03-11 17:43 -------

Let's mark this as an enhancement request.

Template error messages are something that C++X0 will address in core.
Once this solution is nailed down, we'll work on implementing it in the library.

-benjamin

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13860


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

* [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf
  2004-01-25 18:50 [Bug libstdc++/13860] New: " peturr02 at ru dot is
  2004-01-25 18:52 ` [Bug libstdc++/13860] " peturr02 at ru dot is
  2004-01-25 18:54 ` peturr02 at ru dot is
@ 2004-01-25 18:56 ` peturr02 at ru dot is
  2004-03-11 17:43 ` bkoz at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: peturr02 at ru dot is @ 2004-01-25 18:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From peturr02 at ru dot is  2004-01-25 18:56 -------
Created an attachment (id=5578)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5578&action=view)
Test case

This test case uses long for state_type, but fpos<mbstate_t> for pos_type.
When compiled, it gives:

g++0121 -Wall -Wextra  -static	3.cc   -o 3
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc: In
member function `typename std::basic_filebuf<_CharT, _Traits>::pos_type
std::basic_filebuf<_CharT, _Traits>::seekpos(typename _Traits::pos_type,
std::_Ios_Openmode) [with _CharT = char, _Traits = MyTraits]':
3.cc:10:   instantiated from here
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc:637:
error: no matching function for call to `std::basic_filebuf<char,
MyTraits>::_M_seek(std::streamoff, const std::_Ios_Seekdir&, mbstate_t)'
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc:646:
note: candidates are: typename std::basic_filebuf<_CharT, _Traits>::pos_type
std::basic_filebuf<_CharT, _Traits>::_M_seek(typename _Traits::off_type,
std::_Ios_Seekdir, typename _Traits::state_type) [with _CharT = char, _Traits =
MyTraits]
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc: In
member function `typename std::basic_filebuf<_CharT, _Traits>::pos_type
std::basic_filebuf<_CharT, _Traits>::_M_seek(typename _Traits::off_type,
std::_Ios_Seekdir, typename _Traits::state_type) [with _CharT = char, _Traits =
MyTraits]':
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc:618:  
instantiated from `typename std::basic_filebuf<_CharT, _Traits>::pos_type
std::basic_filebuf<_CharT, _Traits>::seekoff(typename _Traits::off_type,
std::_Ios_Seekdir, std::_Ios_Openmode) [with _CharT = char, _Traits =
MyTraits]'
3.cc:10:   instantiated from here
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc:657:
error: no matching function for call to `std::fpos<mbstate_t>::state(long
int&)'
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/postypes.h:178:
note: candidates are: void std::fpos<_StateT>::state(_StateT) [with _StateT =
mbstate_t]
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/postypes.h:182:
note:		      _StateT std::fpos<_StateT>::state() const [with _StateT =
mbstate_t]
make: *** [3] Error 1


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13860


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

* [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf
  2004-01-25 18:50 [Bug libstdc++/13860] New: " peturr02 at ru dot is
  2004-01-25 18:52 ` [Bug libstdc++/13860] " peturr02 at ru dot is
@ 2004-01-25 18:54 ` peturr02 at ru dot is
  2004-01-25 18:56 ` peturr02 at ru dot is
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: peturr02 at ru dot is @ 2004-01-25 18:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From peturr02 at ru dot is  2004-01-25 18:54 -------
Created an attachment (id=5577)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5577&action=view)
Test case

This test case uses long for pos_type. When compiled, it gives:

g++0121 -Wall -Wextra  -static	2.cc   -o 2
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc: In
member function `typename std::basic_filebuf<_CharT, _Traits>::pos_type
std::basic_filebuf<_CharT, _Traits>::seekpos(typename _Traits::pos_type,
std::_Ios_Openmode) [with _CharT = char, _Traits = MyTraits]':
2.cc:10:   instantiated from here
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc:637:
error: request for member `state' in `__pos', which is of non-class type `long
int'
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc: In
member function `typename std::basic_filebuf<_CharT, _Traits>::pos_type
std::basic_filebuf<_CharT, _Traits>::_M_seek(typename _Traits::off_type,
std::_Ios_Seekdir, typename _Traits::state_type) [with _CharT = char, _Traits =
MyTraits]':
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc:618:  
instantiated from `typename std::basic_filebuf<_CharT, _Traits>::pos_type
std::basic_filebuf<_CharT, _Traits>::seekoff(typename _Traits::off_type,
std::_Ios_Seekdir, std::_Ios_Openmode) [with _CharT = char, _Traits =
MyTraits]'
2.cc:10:   instantiated from here
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc:657:
error: request for member `state' in `__ret', which is of non-class type `long
int'
make: *** [2] Error 1


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13860


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

* [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf
  2004-01-25 18:50 [Bug libstdc++/13860] New: " peturr02 at ru dot is
@ 2004-01-25 18:52 ` peturr02 at ru dot is
  2004-01-25 18:54 ` peturr02 at ru dot is
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: peturr02 at ru dot is @ 2004-01-25 18:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From peturr02 at ru dot is  2004-01-25 18:52 -------
Created an attachment (id=5576)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5576&action=view)
Test case

This test case uses long for off_type. When compiled it gives:

g++0121 -Wall -Wextra  -static	1.cc   -o 1
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc: In
member function `typename std::basic_filebuf<_CharT, _Traits>::pos_type
std::basic_filebuf<_CharT, _Traits>::seekpos(typename _Traits::pos_type,
std::_Ios_Openmode) [with _CharT = char, _Traits = MyTraits]':
1.cc:10:   instantiated from here
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include/c++/bits/fstream.tcc:637:
error: `class std::streampos' used where a `long int' was expected
make: *** [1] Error 1


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13860


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

end of thread, other threads:[~2014-05-08 18:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-13860-4@http.gcc.gnu.org/bugzilla/>
2014-05-08 18:30 ` [Bug libstdc++/13860] Poor error messages on invalid template parameters for basic_filebuf redi at gcc dot gnu.org
2014-05-08 18:32 ` redi at gcc dot gnu.org
2004-01-25 18:50 [Bug libstdc++/13860] New: " peturr02 at ru dot is
2004-01-25 18:52 ` [Bug libstdc++/13860] " peturr02 at ru dot is
2004-01-25 18:54 ` peturr02 at ru dot is
2004-01-25 18:56 ` peturr02 at ru dot is
2004-03-11 17:43 ` bkoz at gcc dot gnu dot org
2004-04-29 11:39 ` pcarlini at suse dot de
2004-04-29 11:43 ` pcarlini at suse dot de

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