Skip to content

Commit c87a63e

Browse files
glebmxzyfer
authored andcommitted
Use -std=c++11
-std=c++0x / -std=gnu++0x was the working name of what is nowadays known as C++11. Use the standard name to avoid accidentally depending on GCC-specific extensions and other quirks.
1 parent d09d09d commit c87a63e

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

GNUmakefile.am

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ AM_LDFLAGS = $(AM_COPT) $(AM_COVLDFLAGS)
1818
AM_CPPFLAGS += -I$(top_srcdir)
1919

2020
RESOURCES =
21+
AM_CXXFLAGS += -std=c++11
2122
if COMPILER_IS_MINGW32
2223
RESOURCES += res/libsass.rc
23-
AM_CXXFLAGS += -std=gnu++0x
24-
else
25-
AM_CXXFLAGS += -std=c++0x
2624
endif
2725

2826
TEST_EXTENSIONS = .rb

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,19 @@ ifdef LIBSASS_VERSION
5151
CXXFLAGS += -DLIBSASS_VERSION="\"$(LIBSASS_VERSION)\""
5252
endif
5353

54-
# enable mandatory flag
54+
CXXFLAGS += -std=c++11
55+
LDFLAGS += -std=c++11
56+
5557
ifeq (Windows,$(UNAME))
5658
ifneq ($(BUILD),shared)
5759
STATIC_ALL ?= 1
5860
endif
5961
STATIC_LIBGCC ?= 1
6062
STATIC_LIBSTDCPP ?= 1
61-
CXXFLAGS += -std=gnu++0x
62-
LDFLAGS += -std=gnu++0x
6363
else
6464
STATIC_ALL ?= 0
6565
STATIC_LIBGCC ?= 0
6666
STATIC_LIBSTDCPP ?= 0
67-
CXXFLAGS += -std=c++0x
68-
LDFLAGS += -std=c++0x
6967
endif
7068

7169
ifndef SASS_LIBSASS_PATH

src/GNUmakefile.am

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ AM_CFLAGS = $(AM_COPT)
1313
AM_CXXFLAGS = $(AM_COPT)
1414
AM_LDFLAGS = $(AM_COPT) $(AM_COVLDFLAGS)
1515

16-
if COMPILER_IS_MINGW32
17-
AM_CXXFLAGS += -std=gnu++0x
18-
else
19-
AM_CXXFLAGS += -std=c++0x
20-
endif
16+
AM_CXXFLAGS += -std=c++11
2117

2218
EXTRA_DIST = \
2319
COPYING \

0 commit comments

Comments
 (0)