Review Board 2.0.15


style: remove err.h to prevent a name collision

Review Request #3650 - Created Oct. 10, 2016 and submitted

Information
Brandon Potter
gem5
default
Reviewers
Default
Changeset 11672:b10ab7d47bf5
---------------------------
style: remove err.h to prevent a name collision

Andreas Sandberg's patch, reviews.gem5.org/r/3648/, exposes a problem.

Our src/base/misc.hh includes a macro "warn" that redefines the warn
declaration in <err.h> if src/base/misc.hh is included first before <err.h>.
The function declaration in <err.h> gets clobbered by our macro so that the
function is redefined into a form that doesn't work for the header file
declaration. We should really rename our version of "warn" to something
else (and likely the other macros that we have with names like panic and
fatal). This reordering may cause further issues for poorly named macros so
we should discuss this more generally.

   
Review request changed
Updated (Dec. 15, 2016, 11:08 a.m.)

Status: Closed (submitted)