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++/51657] New: bind1st multiplies a pointer


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

             Bug #: 51657
           Summary: bind1st multiplies a pointer
    Classification: Unclassified
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: giecrilj@stegny.2a.pl
              Host: i586-suse-linux
            Target: i586-suse-linux
             Build: i586-suse-linux


Created attachment 26167
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26167
Preprocessed source

The following code multiplies a pointer by 2 with no warning:

#include <iostream>
int main (int, char *argv []) 
{ 
  ::std ::cout 
<< ::std ::bind1st (::std ::multiplies < ptrdiff_t > (), argv) (02); }

This code should not compile.


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