Created attachment 153469 [details] Use __DECONST to cast away const in getptrtype() During the exp-run in bug 197395, it was found that textproc/wordnet gives errors with clang 3.6.0: http://package18.nyi.freebsd.org/data/headamd64PR197395-default/2015-02-11_23h04m51s/logs/errors/WordNet-3.0_2.log I propose the following minimal fix, which changes the cast in getptrtype() in lib/wnutil.c to use __DECONST().
Thank you, Dimitry, for the patch. Have you checked, whether the __DECONST() macro works with the older gcc compilers used by FreeBSD's earlier releases?
A commit references this bug: Author: mi Date: Wed Feb 25 00:55:57 UTC 2015 New revision: 379859 URL: https://svnweb.freebsd.org/changeset/ports/379859 Log: Rephrase how we do the const-dropping casting so as to pass the muster of clang-3.6.0 PR: 198009 Submitted by: dim Changes: head/textproc/wordnet/files/patch-lib__wnutil.c
Yes, the __DECONST construct works with gcc-4.2.1 as well. Thank you.