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++/57582] New: clone is effectively reserved by <iostream> and should not be


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.


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