comparison src/share/vm/utilities/exceptions.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 55fb97c4c58d
children 52b4284cb496 6e0cb14ce59b
comparison
equal deleted inserted replaced
17935:7384f6a12fc1 17937:78bbf4d43a14
1 /* 1 /*
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 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.
33 #include "runtime/thread.inline.hpp" 33 #include "runtime/thread.inline.hpp"
34 #include "runtime/threadCritical.hpp" 34 #include "runtime/threadCritical.hpp"
35 #include "utilities/events.hpp" 35 #include "utilities/events.hpp"
36 #include "utilities/exceptions.hpp" 36 #include "utilities/exceptions.hpp"
37 37
38 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
38 39
39 // Implementation of ThreadShadow 40 // Implementation of ThreadShadow
40 void check_ThreadShadow() { 41 void check_ThreadShadow() {
41 const ByteSize offset1 = byte_offset_of(ThreadShadow, _pending_exception); 42 const ByteSize offset1 = byte_offset_of(ThreadShadow, _pending_exception);
42 const ByteSize offset2 = Thread::pending_exception_offset(); 43 const ByteSize offset2 = Thread::pending_exception_offset();
234 vsnprintf(msg, max_msg_size, format, ap); 235 vsnprintf(msg, max_msg_size, format, ap);
235 msg[max_msg_size-1] = '\0'; 236 msg[max_msg_size-1] = '\0';
236 va_end(ap); 237 va_end(ap);
237 _throw_msg(thread, file, line, h_name, msg); 238 _throw_msg(thread, file, line, h_name, msg);
238 } 239 }
240
239 241
240 // Creates an exception oop, calls the <init> method with the given signature. 242 // Creates an exception oop, calls the <init> method with the given signature.
241 // and returns a Handle 243 // and returns a Handle
242 Handle Exceptions::new_exception(Thread *thread, Symbol* name, 244 Handle Exceptions::new_exception(Thread *thread, Symbol* name,
243 Symbol* signature, JavaCallArguments *args, 245 Symbol* signature, JavaCallArguments *args,