[GIT] ppl/ppl(master): Avoid the `expected' identifier.

Module: ppl/ppl Branch: master Commit: 36e3ff0ab6e31239d92e90e8fed28a3a674aa199 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=36e3ff0ab6e31...
Author: Roberto Bagnara roberto.bagnara@bugseng.com Date: Sun Dec 14 15:59:49 2014 +0100
Avoid the `expected' identifier. The C++ standard, ISO/IEC 14882:2003(E), reserves it for header <exception>. Fixes a violation of rule MP1.17-0-3 detected by ECLAIR.
---
src/checked.cc | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/checked.cc b/src/checked.cc index 270c598..ac4ac3b 100644 --- a/src/checked.cc +++ b/src/checked.cc @@ -161,7 +161,7 @@ parse_number_part(std::istream& is, number_struct& numer) { return V_CVT_STR_UNK; } if (c == 'i' || c == 'I') { - goto inf; + goto infinity; } if (c != '.') { break; @@ -188,7 +188,7 @@ parse_number_part(std::istream& is, number_struct& numer) { goto unexpected_char; } return V_NAN; - inf: + infinity: case 'i': case 'I': if (!is.get(c)) { @@ -287,13 +287,13 @@ parse_number_part(std::istream& is, number_struct& numer) { goto unexpected_char; } if (c == 'e' || c == 'E') { - goto exp; + goto exponent; } if (c == 'p' || c == 'P') { if (numer.base == 16) { numer.base_for_exponent = 2; exponent_offset_scale = 4; - goto exp; + goto exponent; } else { goto unexpected_char; @@ -306,7 +306,7 @@ parse_number_part(std::istream& is, number_struct& numer) { if (c != '^') { goto unexpected_char; } - exp: + exponent: state = EXPONENT; PPL_ASSERT(numer.base >= 2); const long l_max = C_Integer<long>::max;
participants (1)
-
Roberto Bagnara