- **summary**: Fix C++11 option --> Add enabling extension definitions for
`-std=c++11` option The compiler option `-std=c++11` means to follow the strict
C++11 standard, and cannot use several extensions such as POSIX
functions/definitions (e.g. M_PI, strdup, putenv, and chroot). With the option,
some environments (e.g. Linux) can use the extensions as it is, but other
environments require definitions (e.g. `_GNU_SOURCE`) to enable the extensions.
This commit makes configure script checks the environments and adds the
definitions.
- Description has changed:
Diff:
~~~~
--- old
+++ new
@@ -1,14 +1,15 @@
-Fix C++11 option
+The compiler option `-std=c++11` means
+to follow the strict C++11 standard,
+and cannot use several extensions
+such as POSIX functions/definitions
+(e.g. M_PI, strdup, putenv, and chroot).
-On the Linux environments,
-`M_PI` definition can be used with the `-std=c++11` option.
-However, on the other environments (e.g. MinGW),
-`M_PI` cannot be used with the `-std=c++11` option.
+With the option, some environments (e.g. Linux)
+can use the extensions as it is,
+but other environments require definitions (e.g. `_GNU_SOURCE`)
+to enable the extensions.
-Originally `-std=c++11` is an option to follow the strict C++ standard,
-and cannot use `M_PI` that is not in the C++ standard.
-To use `M_PI`, `-std=gnu++11` instead of `-std=c++11` is required.
-
-Also, the current default for g++ is `-std=gnu++14`, not `-std=c++14`.
+This commit makes
+configure script checks the environments and adds the definitions.
http://codereview.appspot.com/579270051
~~~~
- **Needs**: -->
- **Type**: -->
- **Comment**:
use AC_USE_SYSTEM_EXTENSIONS
Reply
http://codereview.appspot.com/579270051
---
** [issues:#5720] Add enabling extension definitions for `-std=c++11` option
The compiler option `-std=c++11` means to follow the strict C++11 standard, and
cannot use several extensions such as POSIX functions/definitions (e.g. M_PI,
strdup, putenv, and chroot). With the option, some environments (e.g. Linux)
can use the extensions as it is, but other environments require definitions
(e.g. `_GNU_SOURCE`) to enable the extensions. This commit makes configure
script checks the environments and adds the definitions.**
**Status:** Started
**Created:** Sat Feb 01, 2020 06:13 AM UTC by Masamichi Hosoda
**Last Updated:** Sun Feb 02, 2020 04:46 AM UTC
**Owner:** Masamichi Hosoda
The compiler option `-std=c++11` means
to follow the strict C++11 standard,
and cannot use several extensions
such as POSIX functions/definitions
(e.g. M_PI, strdup, putenv, and chroot).
With the option, some environments (e.g. Linux)
can use the extensions as it is,
but other environments require definitions (e.g. `_GNU_SOURCE`)
to enable the extensions.
This commit makes
configure script checks the environments and adds the definitions.
http://codereview.appspot.com/579270051
---
Sent from sourceforge.net because testlilyissues-a...@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/testlilyissues/issues/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/testlilyissues/admin/issues/options. Or, if this is
a mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Testlilyissues-auto mailing list
testlilyissues-a...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/testlilyissues-auto