diff options
| author | Joel Stanley <joel.stanley@au1.ibm.com> | 2017-11-16 12:02:23 +1030 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2018-02-01 15:46:00 -0600 |
| commit | d19301c2376719c8455bd2fa3f11258e62717070 (patch) | |
| tree | 368981c7dcbaa0a157d285fbdb2218bf86873f66 /import/hwpf/fapi2 | |
| parent | 2a2af5987748c901b55e769a826911f7598caa36 (diff) | |
| download | talos-hcode-d19301c2376719c8455bd2fa3f11258e62717070.tar.gz talos-hcode-d19301c2376719c8455bd2fa3f11258e62717070.zip | |
fapi2: Fix template call sites for GCC 7
The following errors stop hostboot from building with modern GCC:
src/import/hwpf/fapi2/include/buffer.H:710:23: error: invalid
operands of types ‘<unresolved overloaded function type>’ and
‘fapi2::bufferTraits<long unsigned int, unsigned int>::bits_type
{aka unsigned int}’ to binary ‘operator<’
out.insert<TS, L, SS>(iv_data);
~~~~~~~~~~^~~
src/import/hwpf/fapi2/include/buffer.H: In member function
‘fapi2::buffer<T, TT>& fapi2::buffer<T, TT>::flipBit()’:
src/import/hwpf/fapi2/include/buffer.H:316:49: error: expected
primary-expression before ‘)’ token
iv_data ^= buffer<T>().setBit<B, C>();
^
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 <joel.stanley@au1.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49760
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'import/hwpf/fapi2')
| -rw-r--r-- | import/hwpf/fapi2/include/buffer.H | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/import/hwpf/fapi2/include/buffer.H b/import/hwpf/fapi2/include/buffer.H index 0015103b..c8f8462d 100644 --- a/import/hwpf/fapi2/include/buffer.H +++ b/import/hwpf/fapi2/include/buffer.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HCODE Project */ /* */ -/* COPYRIGHT 2012,2017 */ +/* COPYRIGHT 2012,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -228,7 +228,7 @@ class buffer static_assert((B >= 0) && ((B + C - 1) < TT::bits_per_unit()), "failed range check"); - iv_data &= buffer<T>().setBit<B, C>().invert(); + iv_data &= buffer<T>().template setBit<B, C>().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<T>().setBit<B, C>(); + iv_data ^= buffer<T>().template setBit<B, C>(); return *this; } @@ -327,7 +327,7 @@ class buffer template< bits_type B, bits_type C = 1> inline bool getBit(void) const { - return buffer<T>().setBit<B, C>() & iv_data; + return buffer<T>().template setBit<B, C>() & iv_data; } /// @@ -707,7 +707,7 @@ class buffer // Extraction is just an insert into o_out buffer<OT> out(o_out); - out.insert<TS, L, SS>(iv_data); + out.template insert<TS, L, SS>(iv_data); o_out = out; return *this; } @@ -727,7 +727,7 @@ class buffer // Extraction is just an insert into o_out buffer<OT> out(o_out); - out.insert<TS, L, SS>(iv_data); + out.template insert<TS, L, SS>(iv_data); o_out = out; return *this; } |

