Mercurial > hg > graal-compiler
comparison src/share/vm/classfile/classFileError.cpp @ 17937:78bbf4d43a14
8037816: Fix for 8036122 breaks build with Xcode5/clang
8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
8043164: Format warning in traceStream.hpp
Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings
Reviewed-by: kvn, coleenp, iveresov, twisti
author | drchase |
---|---|
date | Thu, 22 May 2014 15:52:41 -0400 |
parents | 1d1603768966 |
children |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
27 #include "classfile/stackMapTable.hpp" | 27 #include "classfile/stackMapTable.hpp" |
28 #include "classfile/verifier.hpp" | 28 #include "classfile/verifier.hpp" |
29 | 29 |
30 // Keep these in a separate file to prevent inlining | 30 // Keep these in a separate file to prevent inlining |
31 | 31 |
32 PRAGMA_DIAG_PUSH | |
33 PRAGMA_FORMAT_NONLITERAL_IGNORED | |
34 | |
32 void ClassFileParser::classfile_parse_error(const char* msg, TRAPS) { | 35 void ClassFileParser::classfile_parse_error(const char* msg, TRAPS) { |
33 ResourceMark rm(THREAD); | 36 ResourceMark rm(THREAD); |
34 Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(), | 37 Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(), |
35 msg, _class_name->as_C_string()); | 38 msg, _class_name->as_C_string()); |
36 } | 39 } |
51 ResourceMark rm(THREAD); | 54 ResourceMark rm(THREAD); |
52 Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(), | 55 Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(), |
53 msg, index, name, _class_name->as_C_string()); | 56 msg, index, name, _class_name->as_C_string()); |
54 } | 57 } |
55 | 58 |
59 PRAGMA_DIAG_POP | |
60 | |
56 void StackMapStream::stackmap_format_error(const char* msg, TRAPS) { | 61 void StackMapStream::stackmap_format_error(const char* msg, TRAPS) { |
57 ResourceMark rm(THREAD); | 62 ResourceMark rm(THREAD); |
58 Exceptions::fthrow( | 63 Exceptions::fthrow( |
59 THREAD_AND_LOCATION, | 64 THREAD_AND_LOCATION, |
60 vmSymbols::java_lang_ClassFormatError(), | 65 vmSymbols::java_lang_ClassFormatError(), |