From owner-freebsd-ports-bugs@freebsd.org Fri Jul 15 21:31:34 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B15A5B9A169 for ; Fri, 15 Jul 2016 21:31:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F67E1D7F for ; Fri, 15 Jul 2016 21:31:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u6FLVYbY065617 for ; Fri, 15 Jul 2016 21:31:34 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 209742] devel/godot: Update to 2.0.4.1; add devel/godot-tools port Date: Fri, 15 Jul 2016 21:31:34 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: feature, patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lightside@gmx.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback+ X-Bugzilla-Changed-Fields: attachments.isobsolete flagtypes.name attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 21:31:34 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209742 lightside changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172374|0 |1 is obsolete| | Attachment #172566| |maintainer-approval?(FreeBS Flags| |D@ShaneWare.Biz) --- Comment #54 from lightside --- Created attachment 172566 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D172566&action= =3Dedit Proposed patch (since 415742 revision) Even GCC 4.8.5 from current lang/gcc port doesn't give such suggestions as Clang 3.8: -8<-- % g++48 -Wall -Wextra test.cpp -o test_g++48 && ./test_g++48 check(44100, 44200) =3D 1; check_abs(44100, 44200) =3D 0 check(44200, 44200) =3D 0; check_abs(44200, 44200) =3D 0 check(44300, 44200) =3D 0; check_abs(44300, 44200) =3D 0 -->8- But GCC 6.1.0 from current lang/gcc6 port gives following error: -8<-- % g++6 -Wall -Wextra test.cpp -o test_g++6 && ./test_g++6 test.cpp: In function 'int check_abs(int, unsigned int)': test.cpp:11:18: error: call of overloaded 'abs(unsigned int)' is ambiguous return abs(a - b) > 100; ^ In file included from /usr/local/lib/gcc6/include/c++/cstdlib:75:0, from /usr/local/lib/gcc6/include/c++/stdlib.h:36, from test.cpp:2: /usr/local/lib/gcc6/gcc/x86_64-portbld-freebsd10.2/6.1.0/include-fixed/stdl= ib.h:100:6: note: candidate: int abs(int) int abs(int) __pure2; ^~~ In file included from /usr/local/lib/gcc6/include/c++/stdlib.h:36:0, from test.cpp:2: /usr/local/lib/gcc6/include/c++/cstdlib:185:3: note: candidate: __int128 std::abs(__int128) abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >=3D 0 ? __x : -__x; } ^~~ /usr/local/lib/gcc6/include/c++/cstdlib:180:3: note: candidate: long long i= nt std::abs(long long int) abs(long long __x) { return __builtin_llabs (__x); } ^~~ /usr/local/lib/gcc6/include/c++/cstdlib:172:3: note: candidate: long int std::abs(long int) abs(long __i) { return __builtin_labs(__i); } ^~~ -->8- Therefore, the fix might be "abs(a - (int)b) > 100": -8<-- #include #include int check(int a, unsigned int b) { return (a - b) > 100; } int check_abs(int a, unsigned int b) { return abs(a - (int)b) > 100; } int main() { unsigned int c =3D 44200; for (int i =3D 44100; i <=3D 44300; i +=3D 100) printf("check(%d, %d) =3D %d; check_abs(%d, %d) =3D %d\n", = i, c, check(i, c), i, c, check_abs(i, c)); return 0; } -->8- -8<-- % g++6 -Wall -Wextra test2.cpp -o test2_g++6 && ./test2_g++6 check(44100, 44200) =3D 1; check_abs(44100, 44200) =3D 0 check(44200, 44200) =3D 0; check_abs(44200, 44200) =3D 0 check(44300, 44200) =3D 0; check_abs(44300, 44200) =3D 0 -->8- while the implementation of "-Wabsolute-value" in Clang (3.6, 3.7 and) 3.8 = is questionable (about exact suggestions). --=20 You are receiving this mail because: You are the assignee for the bug.=