Patches for compilig with clang accepted?

22 views
Skip to first unread message

Thomas Braun

unread,
May 2, 2013, 10:52:11 AM5/2/13
to msy...@googlegroups.com
Hi,

I managed to create a llvm+clang mingw package [1]. With that I compiled
msysgit/git using

make CFLAGS="-g -O2 -Wall -Werror -Wno-format-invalid-specifier" CC=clang

and some errors popped up which I fixed and would deem
upstream-pushable. See the attachement or
https://github.com/t-b/git/commits/clang-fixes.
Maybe it makes also sense to send 9d07211 and e81eb32 to upstream git?

[1]: https://github.com/t-b/mingwGitDevEnv/tree/mingw32-llvm+clang
In case you don't want to spend more than 4 hours building it, I
uploaded the result as multi-volume 7z packages[2].
[2]:
https://bintray.com/pkg/show/general/t-b/mingw32-llvm-and-clang/mingw32-llvm-and-clang
0002-Add-pragma-to-ignore-the-warning-for-clang-also.patch
0003-Use-the-correct-syntax-for-pointer-arithmetic.patch
0001-Don-t-check-if-an-unsigned-value-is-negative.patch

Erik Faye-Lund

unread,
May 2, 2013, 11:14:03 AM5/2/13
to Thomas Braun, msysGit
On Thu, May 2, 2013 at 4:52 PM, Thomas Braun
<thomas...@virtuell-zuhause.de> wrote:
> Hi,
>
> I managed to create a llvm+clang mingw package [1]. With that I compiled
> msysgit/git using
>
> make CFLAGS="-g -O2 -Wall -Werror -Wno-format-invalid-specifier" CC=clang
>
> and some errors popped up which I fixed and would deem upstream-pushable.
> See the attachement or https://github.com/t-b/git/commits/clang-fixes.
> Maybe it makes also sense to send 9d07211 and e81eb32 to upstream git?
>

These patches doesn't touch Windows-only code, so this is probably not
the right list for them; clang is interesting for non-Windows users
also. But nice work!

As for the actualy patches, the third one looks bogus to me; "array +
index" is a common way of getting the address of an element in an
array; if claing complains about this, it going to complain about a
*lot* of perfectly reasonable code. I seem to remember that very
change being discussed upstream, though.
Reply all
Reply to author
Forward
0 new messages