mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8037816: Fix for 8036122 breaks build with Xcode5/clang
Repaired or selectively disabled offending formats; future-proofed with additional checking Reviewed-by: kvn, jrose, stefank
This commit is contained in:
parent
563feb9091
commit
305ec3bd3f
293 changed files with 1285 additions and 913 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -42,6 +42,32 @@
|
|||
# include "utilities/globalDefinitions_xlc.hpp"
|
||||
#endif
|
||||
|
||||
#ifndef PRAGMA_DIAG_PUSH
|
||||
#define PRAGMA_DIAG_PUSH
|
||||
#endif
|
||||
#ifndef PRAGMA_DIAG_POP
|
||||
#define PRAGMA_DIAG_POP
|
||||
#endif
|
||||
#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED
|
||||
#define PRAGMA_FORMAT_NONLITERAL_IGNORED
|
||||
#endif
|
||||
#ifndef PRAGMA_FORMAT_IGNORED
|
||||
#define PRAGMA_FORMAT_IGNORED
|
||||
#endif
|
||||
#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL
|
||||
#define PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL
|
||||
#endif
|
||||
#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL
|
||||
#define PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL
|
||||
#endif
|
||||
#ifndef PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
#define PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
#endif
|
||||
#ifndef ATTRIBUTE_PRINTF
|
||||
#define ATTRIBUTE_PRINTF(fmt, vargs)
|
||||
#endif
|
||||
|
||||
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
// This file holds all globally used constants & types, class (forward)
|
||||
|
@ -1284,6 +1310,11 @@ inline int build_int_from_shorts( jushort low, jushort high ) {
|
|||
return ((int)((unsigned int)high << 16) | (unsigned int)low);
|
||||
}
|
||||
|
||||
// Convert pointer to intptr_t, for use in printing pointers.
|
||||
inline intptr_t p2i(const void * p) {
|
||||
return (intptr_t) p;
|
||||
}
|
||||
|
||||
// Printf-style formatters for fixed- and variable-width types as pointers and
|
||||
// integers. These are derived from the definitions in inttypes.h. If the platform
|
||||
// doesn't provide appropriate definitions, they should be provided in
|
||||
|
@ -1302,6 +1333,7 @@ inline int build_int_from_shorts( jushort low, jushort high ) {
|
|||
// Format 64-bit quantities.
|
||||
#define INT64_FORMAT "%" PRId64
|
||||
#define UINT64_FORMAT "%" PRIu64
|
||||
#define UINT64_FORMAT_X "%" PRIx64
|
||||
#define INT64_FORMAT_W(width) "%" #width PRId64
|
||||
#define UINT64_FORMAT_W(width) "%" #width PRIu64
|
||||
|
||||
|
@ -1324,6 +1356,8 @@ inline int build_int_from_shorts( jushort low, jushort high ) {
|
|||
#define PTR_FORMAT "0x%08" PRIxPTR
|
||||
#endif // _LP64
|
||||
|
||||
#define INTPTR_FORMAT_W(width) "%" #width PRIxPTR
|
||||
|
||||
#define SSIZE_FORMAT "%" PRIdPTR
|
||||
#define SIZE_FORMAT "%" PRIuPTR
|
||||
#define SIZE_FORMAT_HEX "0x%" PRIxPTR
|
||||
|
@ -1355,7 +1389,6 @@ static inline void* dereference_vptr(void* addr) {
|
|||
return *(void**)addr;
|
||||
}
|
||||
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
// For unit testing only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue