I have just started writing C code in dev-c++. The programs are running fine, but each C program shows me the following warning:

[Warning] command line option "-fno-access-control" is valid for C++/ObjC++ but not for C

The test program I used was:

#include<stdio.h>
int main(){
system("pause");
return 0;
}

After searching a lot all I could find was:

-fno-access-control Do not obey access control semantics

Can anyone please explain, what is this all about?
Thanks..

Go to Project -> Project Options -> Compiler -> C++ Compiler and set "Turn off all access checking option" to No.

So, this is actually the problem of the compiler, nothing less on my code.. right..?
If that is the case, then why is it not set as "NO" by default..

On occasion it is. It depends on when DevC++ is first used if it is set to default as C++ or C (although to be honest i would stay away from devC++ all together)

Its just one of those little things that bug people. So basically what were saying here is your code is fine devC++ is complaining about nothing and it does not matter :)

Edited 6 Years Ago by Kanoisa: n/a

This question has already been answered. Start a new discussion instead.