This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/47229] Objective C and C++ compiler frontends
- From: "nicola at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 9 Jan 2011 12:08:07 +0000
- Subject: [Bug objc/47229] Objective C and C++ compiler frontends
- Auto-submitted: auto-generated
- References: <bug-47229-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47229
Nicola Pero <nicola at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nicola at gcc dot gnu.org
--- Comment #1 from Nicola Pero <nicola at gcc dot gnu.org> 2011-01-09 12:07:57 UTC ---
To test for an Objective-C compiler, I think you can use something like --
echo "int main (void) { return 0; }" > test.m
gcc -x objective-c test.m -o test.o
if gcc was built without objective-c support, you should get an error.
For objective-c++, you should be able to use
gcc -x objective-c++ test.m -o test.o
The advantage of doing this is that it should work with all versions of gcc
that support objective-c (and btw with other compilers as well).
Let me know if I missed the point completely! ;-)
Thanks