Closed temyurchenko closed 2 years ago
The better fix would probably look similar to the one found here.
I guess we could get rid of qualified
in the generate code and just use complete qualification for everything in the generated code. Would that work for you?
That's one way to do it, but given how warnings are always unknown and can be extended with new compiler settings, and can create vastly different requirements for the generated code, we probably don't want to conform to them. I might be mistaken, but it seems that generally warnings help in building correct programs and guard from programmer's mistakes. The generated code is correct by construction (if the construction algorithm is correct, which may only be checked once). So, there isn't as much value in keeping the same warnings for the generated files. So, another solution would be to disable all warnings and enable a known subset of them in a file-local fashion via a pragma. What do you think about it?
@murcake You make a good point. I think we should probably do both: Turn off -Wall
warnings AND remove qualifications.
@murcake I was wrong, just doing the warning thing you described is the way to go in my revised opinion. See #55
Enabling
-Wprepositive-qualified-module -Werror
breaks the discover utility.It uses prepositive
qualified
in several places, like here and here.Not sure, how to solve it. A workaroundy way would be to allow specifying this as an
-optF
argument. A better way would be to deduce this automatically by looking at the list of enabled extensions. I haven't researched this though yet.If you give me a hint, I can try to fix this.