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..

It's about all-access checking (3.5 Options Controlling C++ Dialect for additional info).

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

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 :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.