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

            Bug ID: 57582
           Summary: clone is effectively reserved by <iostream> and should
                    not be
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nmm1 at cam dot ac.uk

This is probably java leaking into C++, or something of that nature.
The word "clone" does not occur in the C++ standard.

Under OpenSUSE 11.1, gcc 4.8.0 fails on the following code:

/home/nmm/GCC/bin/g++ -std=c++11 -Wall -Wextra -c -O3 junk.cpp

#include <iostream>
using namespace std;

class run;
class clone;

class cell {
    cell (clone * c, run * r) {}
};

junk.cpp:8:17: error: expected ')' before '*' token
     cell (clone * c, run * r) {}

Changing clone to clown and removing <iostream> both cure it.

Reply via email to