Bug in function template std::max()

Rafael Jesus Alcantara Perez rafa@dedalo-ing.com
Wed Aug 23 04:50:00 GMT 2000


Hello:

I have found a bug in G++, so this is the report.

The command line used to generate all files here is:
c++ -v --save-temps max-bug.cc > max-bug-output 2>&1

Greets for a good work.
Rafael.
--
#include <cstring>
#include <algorithm>

int main (void)
{

  size_t        zLength;
  const char*   pkcString = "asdasdasdasdsdasd";

  zLength = max (strlen (pkcString), (size_t) 9);

  return 0;
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: max-bug.ii.bz2
Type: application/x-bzip2
Size: 22650 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000823/832bd2ff/attachment.bz2>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: max-bug.s.bz2
Type: application/x-bzip2
Size: 90 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000823/832bd2ff/attachment-0001.bz2>


More information about the Gcc-bugs mailing list