public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/12550] New: Compile error on attempt to use pointer to member function with iterator
@ 2003-10-09 13:21 pavenis at latnet dot lv
  2003-10-09 13:25 ` [Bug libstdc++/12550] " pavenis at latnet dot lv
  0 siblings, 1 reply; 2+ messages in thread
From: pavenis at latnet dot lv @ 2003-10-09 13:21 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=12550

           Summary: Compile error on attempt to use pointer to member
                    function with iterator
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pavenis at latnet dot lv
                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

The following example doesn't compile both with gcc-3.3.1 and 
gcc-3.4 20031008 (experimental). See error message below.
It's possible to workaround the problem by using 2 lines which are 
commented out in the loop.

 
#include <vector>

struct foo
{
   void a (void);
   void b (void);

   int x;
};


void bar ( void (foo::*funct) (void),
           std::vector<foo> & data )
{
   for (std::vector<foo>::iterator iter=data.begin();
        iter!=data.end();
        ++iter)
   {
      (iter->*funct)();
      //foo & tmp = *iter;
      //(tmp.*funct)();
   }
}

I'm getting following output from /disk2/gcc34/bin/gcc -v -c mfp1.cc:

Reading specs from /disk2/gcc34/lib/gcc/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --prefix=/disk2/gcc34 --enable-shared
--verbose --$
Thread model: posix
gcc version 3.4 20031008 (experimental)
 /disk2/gcc34/libexec/gcc/i686-pc-linux-gnu/3.4/cc1plus -quiet -v -D_GNU_SOURCE
mfp1$
ignoring nonexistent directory
"/disk2/gcc34/lib/gcc/i686-pc-linux-gnu/3.4/../../../$
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/qt-3.2.1/include
 /disk2/gcc34/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4
 /disk2/gcc34/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/i686-pc-linu$
 /disk2/gcc34/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/backward
 /usr/local/include
 /disk2/gcc34/include
 /disk2/gcc34/lib/gcc/i686-pc-linux-gnu/3.4/include
 /usr/include
End of search list.
GNU C++ version 3.4 20031008 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.4 20031008 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
mfp1.cc: In function `void bar(void (foo::*)(), std::vector<foo,
std::allocator<foo>$
mfp1.cc:19: error: no match for 'operator->*' in 'iter ->* funct'


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

* [Bug libstdc++/12550] Compile error on attempt to use pointer to member function with iterator
  2003-10-09 13:21 [Bug libstdc++/12550] New: Compile error on attempt to use pointer to member function with iterator pavenis at latnet dot lv
@ 2003-10-09 13:25 ` pavenis at latnet dot lv
  0 siblings, 0 replies; 2+ messages in thread
From: pavenis at latnet dot lv @ 2003-10-09 13:25 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=12550


pavenis at latnet dot lv changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


------- Additional Comments From pavenis at latnet dot lv  2003-10-09 13:25 -------
Sorry for duplicate submission

*** This bug has been marked as a duplicate of 12549 ***


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

end of thread, other threads:[~2003-10-09 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-09 13:21 [Bug libstdc++/12550] New: Compile error on attempt to use pointer to member function with iterator pavenis at latnet dot lv
2003-10-09 13:25 ` [Bug libstdc++/12550] " pavenis at latnet dot lv

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