This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/69415] -Wmisleading-indentation warns on "if (__b < __a) return __b; return __a;"
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 Jan 2016 15:21:14 +0000
- Subject: [Bug c/69415] -Wmisleading-indentation warns on "if (__b < __a) return __b; return __a;"
- Auto-submitted: auto-generated
- References: <bug-69415-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69415
--- Comment #9 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Similar issue seen here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811579
Package: mosh
> make[5]: Entering directory '/<<PKGBUILDDIR>>/src/protobufs'
...
> userinput.pb.cc: In member function 'virtual bool ClientBuffers::Instruction::IsInitialized() const':
> userinput.pb.cc:375:53: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
> if (!_extensions_.IsInitialized()) return false; return true;
> ^~~~~~
>
> userinput.pb.cc:375:3: note: ...this 'if' clause, but it is not
> if (!_extensions_.IsInitialized()) return false; return true;
> ^~
The code looks like it was autogenerated from:
https://github.com/mobile-shell/mosh/blob/master/src/protobufs/userinput.proto
presumably using https://github.com/google/protobuf