On Wed, Feb 7, 2018 at 4:06 PM, Hans Petter Selasky <hsela...@freebsd.org> wrote: > Author: hselasky > Date: Wed Feb 7 15:06:54 2018 > New Revision: 328973 > URL: https://svnweb.freebsd.org/changeset/base/328973 > > Log: > MFC r328237: > Use the __alloc_size2 attribute where relevant. > > This follows the documented use in GCC. It is basically only relevant for > calloc(3), reallocarray(3) and mallocarray(9). > > NOTE: Without this change clang 5.0.1 can produce incorrect optimisation > code for static processing of data using the allocated object. For example > this has been seen compiling the mlx4 core module, which allocates a > fixed size array which is then sorted by a fixed order loop. The > optimised result, -O2, is incorrect unless this patch is in place. > > Suggested by: Mark Millard > Reference: > https://docs.freebsd.org/cgi/mid.cgi?9DE674C6-EAA3-4E8A-906F-446E74D82FC4 > > Modified: > stable/11/include/stdlib.h > stable/11/sys/sys/malloc.h > Directory Properties: > stable/11/ (props changed)
Hi, Please revert this change. Lots of ports that used to build fine on stable/11 are now failing. /usr/include/stdlib.h:93:7: error: expected function body after function declarator __alloc_size2(1, 2); Antoine (with hat: portmgr) _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"