I don't see how that answers my question. Basically, the cop just ordered me to commit what, if I am not mistaken, is a felony. Should I say, "uh, no, officer, I can't because..." or does the law actually allow for this?
When asked to exit your vehicle there's a non-zero chance you will eventually be cuffed and/or terry frisked. At which point, of course, the gun will be found and, rumbling down from Olympus you hear the words: You Carried A Weapon Without A Permit. It's also possible the cop will see a trace of printing (in fact more than likely in my case). It would be interesting to know what the courts would do with this. "Your honor, I was behaving legally (since I have this nice shiny permit from Colorado and I was in my car) until Officer Smith ordered me to commit the crime."
First off, IANAL and this is definitely worth asking one about, but...
this is where it gets complicated because of contradiction in the courts. This would be a fairly good thing to do a comparison for stop and frisk policies. Possession of small quanitities of marijuana in some locations is not a crime, but public display of it is. When people were asked if they had anything the officers would know about, they would say yes, and when the officer asked to see it, they would(willingly) pull it out of their pocket and they would subsequently be arrested for display(not possession). There are other locations where it is illegal to resist an officer, fail to do what an officer asks or even require that an officer be aware of any weapons as a matter of both policy and law. 'Compulsion' is the category of law that in most common law places states that if someone threatens to kill/harm you or another person unless you commit some form of harm yourself then you are not liable for it so long as the harm you commit is significantly less than the potential harm threatened(if you drive away from an accident where no persons were injured because your hostage taker says keep driving or they'll kill/hurt you or a hostage would be a good hypothetical).
LEO's are given quite a bit of leeway when it comes to using their discretion to do their jobs, doubly so when it comes to protecting self and others. I've never dealt with LEO's in IL, and hopefully never need to, but the times I've interacted with LEO's while armed have been at worst inconvenient(disarming before walking back to their car to sign a speeding ticket) to pleasant(LEO didn't care, just wanted to make sure nobody was hurt and there was no emergency due to the bad weather/road conditions). That being said, I see a LEO being much more reasonable to deal with having been informed through speech rather than through sight. Most everyone here has seen the videos of the rogue cops that seem to have road rage when not informed, but the statistics don't really show such events being anything near common. Each individual person has to make their own decision as to how they think the situation is best handled(because each one is different in its own ways), but, if I have to speak with LEO's(the ones in uniform at least) I always make it known(in as non confrontational a manner as possible) when I'm armed. It makes for a better case afterward when I can show on a recording when and how I informed the LEO and how they responded, if they don't behave reasonably like the vast majority will.
To answer the question I bolded: The law doesn't say what is allowed, it says what is prohibited. The law often prohibits not just people, but the government(e.g. the bill of rights). Does the law allow for this? I'm honestly not sure. Does the law allow for jury nullification(a jury seeing the facts of a case, coming to the conclusion the defendant did the actions that constitute a crime, and returning a not guilty verdict in spite of the facts)? It doesn't specifically prohibit jury nullification and by virtue of the facts the jury has the ability to do just that(some would argue it is a specific purpose of jury in response to unjust laws). Does the law allow it though? The best option is to avoid the interaction altogether by never giving them RAS/PC in the first place. The next best option is honesty(this includes not being deceptive by omission). The next option is redress through the courts(sue them afterwards). None of those options work for anybody that's dead.
Like I said, IANAL, but my personal advice is to state that you are armed if you think there is any chance whatsoever, no matter how small, the firearm would be discovered otherwise. It may be a civil rights issue for some, but people always remember what Rosa Parks ended up getting in the end. They seldom seem to remember the two years is took for "justice" to be served. How valuable is your life? How valuable is a year, or two, or more of it? Pick your battles when you can, and hope they don't pick you when you can't.
In response to the other bolded part: attorneys get the privilege of being able to advise people what to do in such situations and have that person say they were only acting on their attorney's advice as a defense if a problem with their actions arises. That's why it's so hard to get advice from an attorney: their job security it put up as collateral for their advice potentially being wrong. Hundreds of thousands of dollars are spent by individuals to get an education on similar issues and they seldom agree on what laws mean. I'm no idiot, but there are some things I don't think can be answered any time but after the fact, and that's not really helpful to most anyone.