From f9ab59ffe7f22c533df54f28cd7e71affbce854b Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 4 Nov 2018 23:34:44 +0000 Subject: Merge dmd upstream 6243fa6d2 This introduces a new header that pulls in system includes for use only in the DMD front-end part of the compiler, fixing up uses of problematic functions that are prevalent throughout the code. Commits merged from dmd. Fix build of the D frontend on the Hurd and KFreeBSD. Initial patch from Matthias Klose. https://github.com/dlang/dmd/pull/8893 Don't care about D/C++ compatibility in C++ port. Fixes build error in https://gcc.gnu.org/PR87788 https://github.com/dlang/dmd/pull/8895 Allow compiling front-end headers with strict warnings. https://github.com/dlang/dmd/pull/8909 Add root/system.h header for wrapping system includes. Fixes https://gcc.gnu.org/PR87865 https://github.com/dlang/dmd/pull/8910 Move checkedint to dmd/root. https://github.com/dlang/dmd/pull/8912 Use rmem instead of libc for malloc() and strdup(). https://github.com/dlang/dmd/pull/8913 Use align(8) for alignment of UnionExp, fixing several BUS errors due to alignment issues on SPARC. https://github.com/dlang/dmd/pull/8914 Don't pass NULL pointer as format parameter to errorSupplemental. https://github.com/dlang/dmd/pull/8916 gcc/d/ChangeLog: 2018-11-05 Iain Buclaw PR d/87865 * d-system.h: New file. From-SVN: r265780 --- gcc/d/dmd/declaration.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'gcc/d/dmd/declaration.c') diff --git a/gcc/d/dmd/declaration.c b/gcc/d/dmd/declaration.c index 76132b9..9f43b88 100644 --- a/gcc/d/dmd/declaration.c +++ b/gcc/d/dmd/declaration.c @@ -8,10 +8,8 @@ * https://github.com/D-Programming-Language/dmd/blob/master/src/declaration.c */ -#include -#include - -#include "checkedint.h" +#include "root/dsystem.h" +#include "root/checkedint.h" #include "errors.h" #include "init.h" @@ -87,7 +85,7 @@ void Declaration::semantic(Scope *) { } -const char *Declaration::kind() +const char *Declaration::kind() const { return "declaration"; } @@ -188,7 +186,7 @@ Dsymbol *TupleDeclaration::syntaxCopy(Dsymbol *) return NULL; } -const char *TupleDeclaration::kind() +const char *TupleDeclaration::kind() const { return "tuple"; } @@ -575,7 +573,7 @@ bool AliasDeclaration::overloadInsert(Dsymbol *s) return true; } -const char *AliasDeclaration::kind() +const char *AliasDeclaration::kind() const { return "alias"; } @@ -705,7 +703,7 @@ OverDeclaration::OverDeclaration(Identifier *ident, Dsymbol *s, bool hasOverload } } -const char *OverDeclaration::kind() +const char *OverDeclaration::kind() const { return "overload alias"; // todo } @@ -1770,7 +1768,7 @@ void VarDeclaration::setFieldOffset(AggregateDeclaration *ad, unsigned *poffset, //printf(" addField '%s' to '%s' at offset %d, size = %d\n", toChars(), ad->toChars(), offset, memsize); } -const char *VarDeclaration::kind() +const char *VarDeclaration::kind() const { return "variable"; } -- cgit v1.1