[Bug preprocessor/54160] New: gcc should not define __OBJC2__ when lang is not set to ObjC (gcc 4.6 and later)
jeremyhu at macports dot org
gcc-bugzilla@gcc.gnu.org
Thu Aug 2 15:28:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54160
Bug #: 54160
Summary: gcc should not define __OBJC2__ when lang is not set
to ObjC (gcc 4.6 and later)
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jeremyhu@macports.org
gcc should not be defining the __OBJC2__ preprocessor macro when it is not
building for the Objective C or Objective C++ languages.
~ $ echo "" | gcc-mp-4.5 -x objective-c -E -dM - | grep OBJ
#define __OBJC__ 1
~ $ echo "" | gcc-mp-4.5 -E -dM - | grep OBJ
~ $ echo "" | gcc-mp-4.6 -x objective-c -E -dM - | grep OBJ
#define __OBJC__ 1
#define __OBJC2__ 1
~ $ echo "" | gcc-mp-4.6 -E -dM - | grep OBJ
#define __OBJC2__ 1
This is a regression that entered gcc 4.6 and is present in current versions of
4.6, 4.7, and 4.8 snapshots
More information about the Gcc-bugs
mailing list