diff options
author | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-03-26 14:40:06 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-03-26 14:40:06 +0000 |
commit | ecbb1530e317e8b405d29dead5b080fe2ef9f50c (patch) | |
tree | 999523995b74fc9b4bf531a6cabba421735f4b1b /gcc/d/dmd/parse.c | |
parent | 465b8e7f4ecb9af118419dbf14a43cb95e1d12dd (diff) | |
download | gcc-ecbb1530e317e8b405d29dead5b080fe2ef9f50c.zip gcc-ecbb1530e317e8b405d29dead5b080fe2ef9f50c.tar.gz gcc-ecbb1530e317e8b405d29dead5b080fe2ef9f50c.tar.bz2 |
d/dmd: Merge upstream dmd ab702e73e
Fixes memory leak in the front-end symbol mangler, and introduces
recognition and rejection of a few more C types and directives.
Reviewed-on: https://github.com/dlang/dmd/pull/9492
From-SVN: r269945
Diffstat (limited to 'gcc/d/dmd/parse.c')
-rw-r--r-- | gcc/d/dmd/parse.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/d/dmd/parse.c b/gcc/d/dmd/parse.c index e0ee299..3afdbc2 100644 --- a/gcc/d/dmd/parse.c +++ b/gcc/d/dmd/parse.c @@ -3076,7 +3076,23 @@ Type *Parser::parseBasicType(bool dontLookDotIdents) case TOKuns16: t = Type::tuns16; goto LabelX; case TOKint32: t = Type::tint32; goto LabelX; case TOKuns32: t = Type::tuns32; goto LabelX; - case TOKint64: t = Type::tint64; goto LabelX; + case TOKint64: + t = Type::tint64; + nextToken(); + if (token.value == TOKint64) // if `long long` + { + error("use `long` for a 64 bit integer instead of `long long`"); + nextToken(); + } + else if (token.value == TOKfloat64) // if `long double` + { + error("use `real` instead of `long double`"); + t = Type::tfloat80; + nextToken(); + + } + break; + case TOKuns64: t = Type::tuns64; goto LabelX; case TOKint128: t = Type::tint128; goto LabelX; case TOKuns128: t = Type::tuns128; goto LabelX; |