In the following example:
void foo (double *ptr)
{
const double * restrict const restr_ptr=ptr;
}
I get this error:
error: expected a ";" const double * restrict const restr_ptr=ptr;
^
I compile with -std=c99, using gcc 3.4
Any Ideas?
In C++, restrict
is not a keyword (except for Microsoft extensions). It doesn't mean what it does in C. It looks as though you tried to apply C99 mode to your C++ compiler. Use a C compiler to compile C code, and use a C++ compiler to compile C++. Neither language is a subset of the other.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With