Mailinglist Archive: opensuse-factory (498 mails)

< Previous Next >
Re: [opensuse-factory] GCC 6 as default compiler - your help is needed
On Wed, 2016-05-25 at 16:32 +0200, Bjoern Voigt wrote:
Is the GCC 6 option -Werror=misleading-indentation really helpful?

I'd say yes. Actually I have seen code where this was definitively
pointing tat a bug.

A typical error for coders switching between languages:

if (CONDITION)
  Call_Function1
  Call_Function2
CalL_Function3  

In C, this means Call_Function1 is only executed when condition is
TRUE. Call_Function2 and Call_Function3 are always exectuted.

Looking at the way the code is structured, this is very likely NOT what
the coder had in mind - and is exactly what gcc6 now warns about.

Cheers,
Dominique
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups