SVNews r327471

NOTE: This service is experimental and subject to change! Use at your own risk!

2018-01-01 20:39:12 - r327471 by dim (Dimitry Andric)

Complete list of files affected by revision r327471:

(Note: At the moment, these links point to ViewVC on They are probably slow. Do not overuse.)

   Contents     MODIFY   /stable/10  
  History   Contents   Diff   MODIFY   /stable/10/contrib/binutils/bfd/elflink.c  
  History   Contents   Diff   MODIFY   /stable/10/contrib/binutils/include/obstack.h  
   Contents     MODIFY   /stable/11  
  History   Contents   Diff   MODIFY   /stable/11/contrib/binutils/bfd/elflink.c  
  History   Contents   Diff   MODIFY   /stable/11/contrib/binutils/include/obstack.h  
   Contents     MODIFY   /stable/9  
   Contents     MODIFY   /stable/9/contrib  
   Contents     MODIFY   /stable/9/contrib/binutils  
  History   Contents   Diff   MODIFY   /stable/9/contrib/binutils/bfd/elflink.c  
  History   Contents   Diff   MODIFY   /stable/9/contrib/binutils/include/obstack.h  

Commit message:

MFC r327164:

Fix clang 6.0.0 compiler warnings in binutils

Latest clang git has a warning -Wnull-pointer-arithmetic which will
trigger a -Werror failure. Addition and subtraction from a null pointer
is undefined behaviour and could be optimized into anything.

Furthermore, using the difference between two pointers and casting the
result back to a pointer is not portable since the size of ptrdiff_t
does not necessary have to be the same as size of void* (this happens
e.g. on CHERI). Using intptr_t instead fixes this portability issue and
the compiler warning.

Submitted by; Alexander Richardson
Obtained from: CheriBSD
Differential Revision:


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 1 ms, 11 files printed. Current time is 2018-03-22 18:00:47. All times are in UTC/GMT.