-fcheck-new not supported by LLVM/clang
-fcheck-new not supported by LLVM/clang
- Subject: -fcheck-new not supported by LLVM/clang
- From: Beinan Li <email@hidden>
- Date: Tue, 06 Nov 2012 14:22:31 -0500
Hello Xcode,
With Xcode4.5, we use -fcheck-new in our compiler settings which has been triggering this clang warning:
clang: warning: argument unused during compilation: '-fcheck-new'
We wonder if this gcc setting is not supported by clang.
gcc spec seems to say that without this the only mechanism against heap allocation returning null pointers
is through exceptions. However, we disabled exceptions for performance requirements. So this setting
is important to us.
Currently we have to use -Qunused-arguments to suppress the warnings, but
the real question is whether or not it is safe to work without -fcheck-new if it's not supported by clang.
From web search, we also found the following links which implies that it could be a bug in LLVM/clang:
- Except for the -fcheck-new option, Clang seems to understand all the other compiler options used during the HotSpot build process. For -fcheck-new a warning is issued advertising that the option will be ignored. So I just removed it frommake/linux/makefiles/clang.make. I have also removed obvious workarounds for some older GCC versions in the new Clang files which were derived from their corresponding GCC counterparts.
Anybody has any comments?
Thanks!
Beinan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden