Review Board 2.0.15


gcc: Fix memset warnings concerning constant zero length

Review Request #1278 - Created June 27, 2012 and discarded

Information
Andreas Hansson
gem5
default
Reviewers
Default
Changeset 9073:649586dc385a
---------------------------
gcc: Fix memset warnings concerning constant zero length

This patch solves two link-time warnings that are raised by gcc 4.7.1
after performing what seems to be an astonishing amount of unrolling
and inlining as part of Link Time Optimization (it takes almost 3
hours for ARM and uses a good 4+ GByte of memory). As the linking is
about to finish, _format_string in cprintf and memsetBlob in the
PortProxy are both causing a number of warnings: "call to
'__warn_memset_zero_len' declared with attribute warning: memset used
with constant zero length parameter;". It is not clear from the code
why this would ever happen unless gcc moves the block of code. In any
case, the changes make these warning disappear.
util/regress all passing (disregarding t1000 and eio)

compiled with gcc 4.3 - 4.7 and clang 2.9 - 3.1
Review request changed
Updated (June 27, 2012, 9:36 p.m.)

Status: Discarded

Change Summary:

This seems to be specific to gcc 4.7.1 on Ubuntu 12.10 as I have not been able to replicate on rhe5. Discarding for now.