This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/16396] ostream << volatile char* converts to ostream << bool


------- Additional Comments From bangerth at dealii dot org  2004-07-07 00:08 -------
The argument to operator<< is of type 'volatile char*', which
is converted to bool in absence of a better match. Since the
pointer is non-null, the bool is 'true', which is printed as '1'.

Now, whether this conversion is correct, I don't know -- a matter
for the libstdc++ people. 

W.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |libstdc++
            Summary|cout of volatile char *     |ostream << volatile char*
                   |prints funny                |converts to  ostream << bool


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]