This is the mail archive of the gcc-help@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]

-std=xxx does not work with C++ code


Hi,

the following code will be rejected when using -std=whatever.
Only -ansi works. Another program I tried coudn't find <typeinfo>.

namespace A { int f(); }
int A::f() { return 0; }

int main (int argc, char *argv[])
{
    int i = A::f();
    return i;
}

Ok, strictly speaking, C++ constructs aren't mentioned in the
C89/C99 standard. But C++ is often mixed with C code.

Is this the indented behaviour?

Thanks,
--Daniel


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