8266206: Build failure after JDK-8264752 with older GCCs
Reviewed-by: mgronlun
This commit is contained in:
parent
c71c26859f
commit
21f65f8e79
@ -395,8 +395,9 @@ static julong divide_with_user_unit(Argument& memory_argument, julong value) {
|
|||||||
|
|
||||||
static const char higher_than_msg[] = "This value is higher than the maximum size limited ";
|
static const char higher_than_msg[] = "This value is higher than the maximum size limited ";
|
||||||
static const char lower_than_msg[] = "This value is lower than the minimum size required ";
|
static const char lower_than_msg[] = "This value is lower than the minimum size required ";
|
||||||
template <typename Argument, char const *msg>
|
template <typename Argument, bool lower>
|
||||||
static void log_out_of_range_value(Argument& memory_argument, julong min_value) {
|
static void log_out_of_range_value(Argument& memory_argument, julong min_value) {
|
||||||
|
const char* msg = lower ? lower_than_msg : higher_than_msg;
|
||||||
if (memory_argument.value()._size != memory_argument.value()._val) {
|
if (memory_argument.value()._size != memory_argument.value()._val) {
|
||||||
// has multiplier
|
// has multiplier
|
||||||
log_error(arguments) (
|
log_error(arguments) (
|
||||||
@ -619,7 +620,7 @@ template <typename Argument>
|
|||||||
static bool ensure_gteq(Argument& memory_argument, const jlong value) {
|
static bool ensure_gteq(Argument& memory_argument, const jlong value) {
|
||||||
if ((jlong)memory_argument.value()._size < value) {
|
if ((jlong)memory_argument.value()._size < value) {
|
||||||
log_set_value(memory_argument);
|
log_set_value(memory_argument);
|
||||||
log_out_of_range_value<Argument, lower_than_msg>(memory_argument, value);
|
log_out_of_range_value<Argument, true>(memory_argument, value);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -654,7 +655,7 @@ template <typename Argument>
|
|||||||
static bool ensure_lteq(Argument& memory_argument, const jlong value) {
|
static bool ensure_lteq(Argument& memory_argument, const jlong value) {
|
||||||
if ((jlong)memory_argument.value()._size > value) {
|
if ((jlong)memory_argument.value()._size > value) {
|
||||||
log_set_value(memory_argument);
|
log_set_value(memory_argument);
|
||||||
log_out_of_range_value<Argument, higher_than_msg>(memory_argument, value);
|
log_out_of_range_value<Argument, false>(memory_argument, value);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user