gcc: Clean-up of non-C++0x compliant code, first steps
authorAndreas Hansson <andreas.hansson@arm.com>
Mon, 19 Mar 2012 10:36:09 +0000 (06:36 -0400)
committerAndreas Hansson <andreas.hansson@arm.com>
Mon, 19 Mar 2012 10:36:09 +0000 (06:36 -0400)
commit72538294fb1eb2e4dcd5d818c78bcdf78b0de491
treeba95d431b41d54c7c25a3b5e84dfca9707a9feb2
parentadb862103138caf11191da50d34eb4c93295633a
gcc: Clean-up of non-C++0x compliant code, first steps

This patch cleans up a number of minor issues aiming to get closer to
compliance with the C++0x standard as interpreted by gcc and clang
(compile with std=c++0x and -pedantic-errors). In particular, the
patch cleans up enums where the last item was succeded by a comma,
namespaces closed by a curcly brace followed by a semi-colon, and the
use of the GNU-extension typeof (replaced by templated functions). It
does not address variable-length arrays, zero-size arrays, anonymous
structs, range expressions in switch statements, and the use of long
long. The generated CPU code also has a large number of issues that
remain to be fixed, mainly related to overflows in implicit constant
conversion (due to shifts).
56 files changed:
src/arch/alpha/isa/main.isa
src/arch/alpha/isa_traits.hh
src/arch/alpha/types.hh
src/arch/arm/intregs.hh
src/arch/arm/isa/templates/neon.isa
src/arch/arm/linux/atag.hh
src/arch/arm/miscregs.cc
src/arch/arm/miscregs.hh
src/arch/arm/nativetrace.cc
src/arch/arm/pagetable.hh
src/arch/arm/predecoder.hh
src/arch/arm/table_walker.hh
src/arch/arm/utility.hh
src/arch/arm/vtophys.hh
src/arch/x86/bios/e820.hh
src/arch/x86/emulenv.hh
src/arch/x86/faults.hh
src/arch/x86/isa/macroop.isa
src/arch/x86/isa_traits.hh
src/arch/x86/locked_mem.hh
src/arch/x86/mmapped_ipr.hh
src/arch/x86/nativetrace.cc
src/arch/x86/predecoder.hh
src/arch/x86/regs/float.hh
src/arch/x86/regs/int.hh
src/arch/x86/regs/misc.hh
src/arch/x86/regs/segment.hh
src/arch/x86/tlb.cc
src/arch/x86/types.hh
src/arch/x86/utility.hh
src/arch/x86/vtophys.hh
src/base/bitmap.cc
src/base/callback.cc
src/base/range.cc
src/base/range_map.hh
src/base/str.cc
src/base/vnc/convert.hh
src/cpu/base_dyn_inst.hh
src/cpu/exetrace.cc
src/cpu/inorder/inorder_dyn_inst.hh
src/cpu/inorder/pipeline_traits.hh
src/cpu/inorder/resource.hh
src/cpu/inteltrace.cc
src/cpu/o3/dyn_inst.hh
src/cpu/o3/thread_context.hh
src/cpu/simple_thread.hh
src/cpu/static_inst.hh
src/cpu/thread_context.hh
src/cpu/thread_state.hh
src/dev/i8254xGBe.hh
src/dev/ide_atareg.h
src/dev/sinicreg.hh
src/python/m5/params.py
src/sim/byteswap.hh
src/sim/eventq.hh
src/sim/serialize.hh