[Development] Compiler warnings

Kurt Pattyn pattyn.kurt at gmail.com
Fri Oct 17 10:22:48 CEST 2014

> On 17 Oct 2014, at 10:15, Christian Kandeler <christian.kandeler at digia.com> wrote:
>> On 10/17/2014 08:48 AM, Kurt Pattyn wrote:
>> As we are developing for aerospace, avionics, defence and healthcare, we are confronted on a daily basis with a lot of very stringent rules that we have to comply with (irrespective if some people might find these rules outdated, stupid, ridiculous or not). That's why we always compile with as much compiler warnings as possible. Our code must be audited by an external office anyways, so we better make sure we can avoid a bad report as soon as possible.
>> Some examples of 'stupid' rules (which after second consideration aren't that stupid after all):
>> - a switch statement must always have a default statement (also all cases must be handled)
> Doesn't this actually make the code *worse* when using enums? Adding a 
> default statement when you handle all possible values will inhibit 
> genuine compiler warnings when you forget to add a case for a newly 
> added enum value. In fact, this is almost guaranteed to happen in a 
> non-trivial project, so this rule seems almost absurdly wrong to me.
Regulations are usually not an example of common sense :-) Maybe version 2020-TR/A-99576-37A-ammendment37bis will remove this :-) Sigggh
> Christian
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

More information about the Development mailing list