954,480 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

[Warning] -fno-access-control

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

techie1991
Junior Poster in Training
72 posts since Feb 2010
Reputation Points: 36
Solved Threads: 9
 

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.

volvo877
Newbie Poster
7 posts since Jun 2009
Reputation Points: 3
Solved Threads: 3
 
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..

techie1991
Junior Poster in Training
72 posts since Feb 2010
Reputation Points: 36
Solved Threads: 9
 

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

Kanoisa
Posting Whiz in Training
224 posts since Jul 2008
Reputation Points: 62
Solved Threads: 28
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: