This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-std=xxx does not work with C++ code
- To: gcc-help at gcc dot gnu dot org
- Subject: -std=xxx does not work with C++ code
- From: Daniel Elstner <daniel dot elstner at gmx dot net>
- Date: Sun, 17 Jun 2001 19:42:00 +0200
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