mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
examples: clang 5 defines nullptr as a macro
* examples/variant.yy: So don't do it. * examples/variant-11.yy: Fix comment.
This commit is contained in:
@@ -116,7 +116,8 @@ namespace yy
|
||||
// TEXT "I have three numbers for you."
|
||||
// NUMBER 1
|
||||
// NUMBER 2
|
||||
// NUMBER 3
|
||||
// NUMBER ...
|
||||
// NUMBER max - 1
|
||||
// TEXT "And that's all!"
|
||||
// END_OF_FILE
|
||||
|
||||
|
||||
@@ -99,7 +99,9 @@ namespace yy
|
||||
{
|
||||
// Use nullptr with pre-C++11.
|
||||
#if defined __cplusplus && __cplusplus < 201103L
|
||||
# define nullptr 0
|
||||
# define NULLPTR 0
|
||||
#else
|
||||
# define NULLPTR nullptr
|
||||
#endif
|
||||
|
||||
// The yylex function providing subsequent tokens:
|
||||
@@ -117,7 +119,7 @@ namespace yy
|
||||
static int count = 0;
|
||||
const int stage = count;
|
||||
++count;
|
||||
parser::location_type loc (nullptr, unsigned (stage + 1), unsigned (stage + 1));
|
||||
parser::location_type loc (NULLPTR, unsigned (stage + 1), unsigned (stage + 1));
|
||||
switch (stage)
|
||||
{
|
||||
case 0:
|
||||
|
||||
Reference in New Issue
Block a user