From fca1480ab5511cc85ae05e688987eada1cafd9ba Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Thu, 16 Nov 2017 12:02:23 +1030 Subject: fapi2: Fix template call sites for GCC 7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following errors stop hostboot from building with modern GCC: src/import/hwpf/fapi2/include/buffer.H:710:23: error: invalid operands of types ‘’ and ‘fapi2::bufferTraits::bits_type {aka unsigned int}’ to binary ‘operator<’ out.insert(iv_data); ~~~~~~~~~~^~~ src/import/hwpf/fapi2/include/buffer.H: In member function ‘fapi2::buffer& fapi2::buffer::flipBit()’: src/import/hwpf/fapi2/include/buffer.H:316:49: error: expected primary-expression before ‘)’ token iv_data ^= buffer().setBit(); ^ In both cases the call site needs to be prepended with the keyword 'template'. Otherwise the name is assumed to be a non-template (as per C++ 14.2/4). Change-Id: I925c35d51787c4f4f232372f0e1299ec2a5cab42 Signed-off-by: Joel Stanley Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49760 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: HWSV CI Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Daniel M. Crowell Reviewed-by: ANDRE A. MARIN Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49890 Reviewed-by: Hostboot Team Reviewed-by: Sachin Gupta --- src/import/hwpf/fapi2/include/buffer.H | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/import/hwpf') diff --git a/src/import/hwpf/fapi2/include/buffer.H b/src/import/hwpf/fapi2/include/buffer.H index 572d4813..c1756ba3 100644 --- a/src/import/hwpf/fapi2/include/buffer.H +++ b/src/import/hwpf/fapi2/include/buffer.H @@ -228,7 +228,7 @@ class buffer static_assert((B >= 0) && ((B + C - 1) < TT::bits_per_unit()), "failed range check"); - iv_data &= buffer().setBit().invert(); + iv_data &= buffer().template setBit().invert(); return *this; } @@ -313,7 +313,7 @@ class buffer static_assert((B >= 0) && ((B + C - 1) < TT::bits_per_unit()), "failed range check"); - iv_data ^= buffer().setBit(); + iv_data ^= buffer().template setBit(); return *this; } @@ -327,7 +327,7 @@ class buffer template< bits_type B, bits_type C = 1> inline bool getBit(void) const { - return buffer().setBit() & iv_data; + return buffer().template setBit() & iv_data; } /// @@ -707,7 +707,7 @@ class buffer // Extraction is just an insert into o_out buffer out(o_out); - out.insert(iv_data); + out.template insert(iv_data); o_out = out; return *this; } @@ -727,7 +727,7 @@ class buffer // Extraction is just an insert into o_out buffer out(o_out); - out.insert(iv_data); + out.template insert(iv_data); o_out = out; return *this; } -- cgit v1.2.1