From 8f3e06cf26f41d69e3741234e340ceb23fa3ce9a Mon Sep 17 00:00:00 2001 From: David Givone Date: Sun, 6 Jan 2013 22:20:24 -0800 Subject: [PATCH] Change -x language option to use new objective c standard for gcc and clang When preprocessing objective-c[++] files, use -x objective-c-cpp-output or -x objective-c++-cpp-output which is supported by gcc 4.0+ and clang. Previously, -x objc-cpp-output or -x objc++-cpp-output was used, but not supported by clang. --- language.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/language.c b/language.c index acbeb89c3..3700476f8 100644 --- a/language.c +++ b/language.c @@ -44,8 +44,8 @@ static const struct { /* Preprocessed: */ {".i", "cpp-output"}, {".ii", "c++-cpp-output"}, - {".mi", "objc-cpp-output"}, - {".mii", "objc++-cpp-output"}, + {".mi", "objective-c-cpp-output"}, + {".mii", "objective-c++-cpp-output"}, /* Header file (for precompilation): */ {".h", "c-header"}, {".H", "c++-header"}, @@ -70,18 +70,20 @@ static const struct { const char *language; const char *p_language; } languages[] = { - {"c", "cpp-output"}, - {"cpp-output", "cpp-output"}, - {"c-header", "cpp-output"}, - {"c++", "c++-cpp-output"}, - {"c++-cpp-output", "c++-cpp-output"}, - {"c++-header", "c++-cpp-output"}, - {"objective-c", "objc-cpp-output"}, - {"objective-c-header", "objc-cpp-output"}, - {"objc-cpp-output", "objc-cpp-output"}, - {"objective-c++", "objc++-cpp-output"}, - {"objc++-cpp-output", "objc++-cpp-output"}, - {"objective-c++-header", "objc++-cpp-output"}, + {"c", "cpp-output"}, + {"cpp-output", "cpp-output"}, + {"c-header", "cpp-output"}, + {"c++", "c++-cpp-output"}, + {"c++-cpp-output", "c++-cpp-output"}, + {"c++-header", "c++-cpp-output"}, + {"objective-c", "objective-c-cpp-output"}, + {"objective-c-header", "objective-c-cpp-output"}, + {"objc-cpp-output", "objective-c-cpp-output"}, + {"objective-c-cpp-output", "objective-c-cpp-output"}, + {"objective-c++", "objective-c++-cpp-output"}, + {"objc++-cpp-output", "objective-c++-cpp-output"}, + {"objective-c++-header", "objective-c++-cpp-output"}, + {"objective-c++-cpp-output", "objective-c++-cpp-output"}, {NULL, NULL}}; /* -- 2.47.2