ENV (superenv / stdenv): Mark every future version of GCC above gcc-4.8 (including the as-of-current-writing gcc-7) as supporting C++11, which fixes ENV.cxx11
usage in Tigerbrew formulae.
#767
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The previous version of the regular expression only detected
gcc-4.8
,gcc-4.9
, andgcc-5
as supporting C++11, but erroneously fails to detect newer versions of GCC as supporting C++11.This currently results in any Tigerbrew formulae using
ENV.cxx11
to incorrectly throw an error when a user has the latest version of thegcc
formula installed (which installsgcc-7
as of this writing).The updated regular expression successfully detects not only
gcc-7
, but also future versions all the way up togcc-99
(!) for futureproofing purposes, in case thegcc
formula gets updated to a newer version of GCC at some point in the future.Here are some strings I tested against my modified regular expression to make sure it works correctly:
gcc-4.0
→ No matchgcc-4.2
→ No matchgcc-4.8
→ Matchgcc-4.9
→ Matchgcc-5
→ Matchgcc-5.1
→ Matchgcc-7
→ Matchgcc-11
→ Matchgcc-42
→ Matchgcc-99
→ Match