]> git.ipfire.org Git - thirdparty/gcc.git/commit - libphobos/src/std/socket.d
d: Merge upstream dmd 3b808e838, druntime 483bc129, phobos f89dc217a
authorIain Buclaw <ibuclaw@gdcproject.org>
Fri, 2 Apr 2021 11:29:22 +0000 (13:29 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sat, 3 Apr 2021 23:26:20 +0000 (01:26 +0200)
commit5a0aa603b2452dca48ad86d97d4b918187d259fc
tree67439099b8129248a45826b5791912b20ff3c3fb
parentba0f6902666430e5d065a92b3d5292cba91813d3
d: Merge upstream dmd 3b808e838, druntime 483bc129, phobos f89dc217a

D front-end changes:

 - Explicit package visibility attribute is now always applied to
   introducing scopes.

 - Added `__traits(totype, string)' to convert mangled type string to an
   existing type.

 - Printf-like and scanf-like functions are now detected by prefixing
   them with `pragma(printf)' for printf-like functions or
   `pragma(scanf)' for scanf-like functions.

 - Added `__c_wchar_t', `__c_complex_float', `__c_complex_double', and
   `__c_complex_real' types for interfacing with C and C++.

 - Template alias parameters can now be instantiated with basic types,
   such as `int` or `void function()`.

 - Mixins can now be used as types in the form `mixin(string) var'.

 - Mixin expressions can take an argument list, same as `pragma(msg)'.

 - Implement DIP1034, add `typeof(*null)' types to represent `noreturn'.

 - `pragma(msg)' can print expressions of type `void'.

 - It is now an error to use private variables selectively imported from
   other modules.  Due to a bug, some imported private members were
   visible from other modules, violating the specification.

 - Added new syntax to declare an alias to a function type using the
   `alias' syntax based on the assignment operator.

 - Function literals can now return a value by reference.

Phobos changes:

 - Synchronize C bindings with the latest port fixes in upstream druntime.

 - Added alias for a `noreturn' type in object.d

 - Make use of the new `pragma(printf)' and `pragma(scanf)' pragmas, fix
   all code that got flagged as being incorrect.

 - Fixed code that relied on bugs in the D import package system.

Reviewed-on: https://github.com/dlang/dmd/pull/12339
     https://github.com/dlang/druntime/pull/3422
     https://github.com/dlang/phobos/pull/7932

gcc/d/ChangeLog:

* dmd/MERGE: Merge upstream dmd 3b808e838.
* Make-lang.in (D_FRONTEND_OBJS): Add d/chkformat.o.
* d-codegen.cc (build_struct_literal): Handle special enums.
* d-convert.cc (convert_expr): Handle noreturn type.
(convert_for_condition): Likewise.
* d-target.cc (Target::_init): Set type for wchar_t.
(TargetCPP::derivedClassOffset): New method.
(Target::libraryObjectMonitors): New method.
* decl.cc (get_symbol_decl): Set TREE_THIS_VOLATILE for functions of
type noreturn.
* toir.cc (IRVisitor::visit (ReturnStatement *)): Handle returning
noreturn types.
* types.cc (TypeVisitor::visit (TypeNoreturn *)): New method.
(TypeVisitor::visit (TypeEnum *)): Handle special enums.

libphobos/ChangeLog:

* libdruntime/MERGE: Merge upstream druntime 483bc129.
* libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add
core/sys/darwin/fcntl.d.
(DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/unistd.d.
(DRUNTIME_DSOURCES_WINDOWS): Add core/sys/windows/stdc/malloc.d.
* libdruntime/Makefile.in: Regenerate.
* src/MERGE: Merge upstream phobos f89dc217a.
* src/Makefile.am (PHOBOS_DSOURCES): Add std/regex/internal/tests2.d.
* src/Makefile.in: Regenerate.
* testsuite/libphobos.exceptions/chain.d: Fix format arguments.
* testsuite/libphobos.exceptions/line_trace.d: Likewise.
191 files changed:
gcc/d/Make-lang.in
gcc/d/d-codegen.cc
gcc/d/d-convert.cc
gcc/d/d-target.cc
gcc/d/decl.cc
gcc/d/dmd/MERGE
gcc/d/dmd/attrib.c
gcc/d/dmd/attrib.h
gcc/d/dmd/blockexit.c
gcc/d/dmd/chkformat.c [new file with mode: 0644]
gcc/d/dmd/cppmangle.c
gcc/d/dmd/ctfeexpr.c
gcc/d/dmd/dcast.c
gcc/d/dmd/dclass.c
gcc/d/dmd/declaration.h
gcc/d/dmd/denum.c
gcc/d/dmd/dimport.c
gcc/d/dmd/dmangle.c
gcc/d/dmd/dmodule.c
gcc/d/dmd/dscope.c
gcc/d/dmd/dsymbol.c
gcc/d/dmd/dsymbol.h
gcc/d/dmd/dsymbolsem.c
gcc/d/dmd/dtemplate.c
gcc/d/dmd/expression.c
gcc/d/dmd/expression.h
gcc/d/dmd/expressionsem.c
gcc/d/dmd/func.c
gcc/d/dmd/hdrgen.c
gcc/d/dmd/hdrgen.h
gcc/d/dmd/idgen.c
gcc/d/dmd/import.h
gcc/d/dmd/module.h
gcc/d/dmd/mtype.c
gcc/d/dmd/mtype.h
gcc/d/dmd/parse.c
gcc/d/dmd/parse.h
gcc/d/dmd/scope.h
gcc/d/dmd/semantic2.c
gcc/d/dmd/semantic3.c
gcc/d/dmd/statement.c
gcc/d/dmd/statement.h
gcc/d/dmd/statementsem.c
gcc/d/dmd/target.h
gcc/d/dmd/template.h
gcc/d/dmd/templateparamsem.c
gcc/d/dmd/traits.c
gcc/d/dmd/typesem.c
gcc/d/dmd/visitor.h
gcc/d/toir.cc
gcc/d/types.cc
gcc/testsuite/gdc.test/compilable/bug20796.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/cppmangle.d
gcc/testsuite/gdc.test/compilable/ddocunittest.d
gcc/testsuite/gdc.test/compilable/extra-files/serenity7190/core/Controller.d
gcc/testsuite/gdc.test/compilable/extra-files/test20280a.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/fix21585.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/fix21647.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/ice10598.d [deleted file]
gcc/testsuite/gdc.test/compilable/imports/issue21614a.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/pkg20537/package.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/test17991a/a.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/test17991a/package.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/test20151a/b/c/c.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/test20530a.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/test21501b.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/test21501c.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/issue16020.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/issue21614.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/issue21726.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/mixintype.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/mixintype2.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/noreturn1.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/protection/issue20796/package.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/protection/issue21726/format/package.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/protection/issue21726/package.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/protection/issue21726/typecons.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test16002.d
gcc/testsuite/gdc.test/compilable/test17991.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test19292.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test20151a.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test20280.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test20530.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test20537.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test20692.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test21501a.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/test9029.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/bug15613.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/bug16165.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/bug9631.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/chkformat.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/cppmangle.d
gcc/testsuite/gdc.test/fail_compilation/diag11819b.d
gcc/testsuite/gdc.test/fail_compilation/diag13082.d
gcc/testsuite/gdc.test/fail_compilation/diag16271.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/diag8101.d
gcc/testsuite/gdc.test/fail_compilation/diag8101b.d
gcc/testsuite/gdc.test/fail_compilation/diag9420.d
gcc/testsuite/gdc.test/fail_compilation/fail11038.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/fail11445.d
gcc/testsuite/gdc.test/fail_compilation/fail15361.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/fail15896.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/fail17630.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/fail18219.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/fail19107.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/fail263.d
gcc/testsuite/gdc.test/fail_compilation/fail3.d
gcc/testsuite/gdc.test/fail_compilation/fail322.d
gcc/testsuite/gdc.test/fail_compilation/fail332.d
gcc/testsuite/gdc.test/fail_compilation/fail347.d
gcc/testsuite/gdc.test/fail_compilation/fail53.d
gcc/testsuite/gdc.test/fail_compilation/fail55.d
gcc/testsuite/gdc.test/fail_compilation/fail79.d
gcc/testsuite/gdc.test/fail_compilation/fail99.d
gcc/testsuite/gdc.test/fail_compilation/fix21585.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/format.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/ice10598.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/ice10922.d
gcc/testsuite/gdc.test/fail_compilation/ice12497.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/ice12501.d
gcc/testsuite/gdc.test/fail_compilation/ice14907.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/ice14923.d
gcc/testsuite/gdc.test/fail_compilation/ice8255.d
gcc/testsuite/gdc.test/fail_compilation/ice9540.d
gcc/testsuite/gdc.test/fail_compilation/imports/a17630.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/imports/a18219.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/imports/b17630.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/imports/b18219.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/imports/ice10598a.d [moved from gcc/testsuite/gdc.test/compilable/imports/ice10598a.d with 100% similarity]
gcc/testsuite/gdc.test/fail_compilation/imports/ice10598b.d [moved from gcc/testsuite/gdc.test/compilable/imports/ice10598b.d with 100% similarity]
gcc/testsuite/gdc.test/fail_compilation/imports/imp15896.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/imports/test21651b.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/issue16020.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/mixintype2.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/test16002.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/test21651.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/warn12809.d
gcc/testsuite/gdc.test/runnable/funclit.d
gcc/testsuite/gdc.test/runnable/mangle.d
gcc/testsuite/gdc.test/runnable/noreturn1.d [new file with mode: 0644]
gcc/testsuite/gdc.test/runnable_cxx/cppa.d
gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp
gcc/testsuite/gdc.test/runnable_cxx/extra-files/test21515.cpp [new file with mode: 0644]
gcc/testsuite/gdc.test/runnable_cxx/test21515.d [new file with mode: 0644]
libphobos/libdruntime/MERGE
libphobos/libdruntime/Makefile.am
libphobos/libdruntime/Makefile.in
libphobos/libdruntime/core/stdc/complex.d
libphobos/libdruntime/core/stdc/config.d
libphobos/libdruntime/core/stdc/errno.d
libphobos/libdruntime/core/stdc/math.d
libphobos/libdruntime/core/stdc/stdio.d
libphobos/libdruntime/core/stdc/stdlib.d
libphobos/libdruntime/core/stdc/tgmath.d
libphobos/libdruntime/core/stdc/wchar_.d
libphobos/libdruntime/core/sys/darwin/fcntl.d [new file with mode: 0644]
libphobos/libdruntime/core/sys/linux/epoll.d
libphobos/libdruntime/core/sys/openbsd/string.d
libphobos/libdruntime/core/sys/openbsd/unistd.d [new file with mode: 0644]
libphobos/libdruntime/core/sys/posix/config.d
libphobos/libdruntime/core/sys/posix/dlfcn.d
libphobos/libdruntime/core/sys/posix/signal.d
libphobos/libdruntime/core/sys/posix/unistd.d
libphobos/libdruntime/core/sys/windows/com.d
libphobos/libdruntime/core/sys/windows/dll.d
libphobos/libdruntime/core/sys/windows/stdc/malloc.d [new file with mode: 0644]
libphobos/libdruntime/gc/impl/conservative/gc.d
libphobos/libdruntime/object.d
libphobos/src/MERGE
libphobos/src/Makefile.am
libphobos/src/Makefile.in
libphobos/src/std/algorithm/iteration.d
libphobos/src/std/algorithm/searching.d
libphobos/src/std/container/rbtree.d
libphobos/src/std/conv.d
libphobos/src/std/datetime/systime.d
libphobos/src/std/experimental/logger/nulllogger.d
libphobos/src/std/experimental/typecons.d
libphobos/src/std/file.d
libphobos/src/std/format.d
libphobos/src/std/internal/math/biguintcore.d
libphobos/src/std/math.d
libphobos/src/std/parallelism.d
libphobos/src/std/range/package.d
libphobos/src/std/regex/internal/tests.d
libphobos/src/std/regex/internal/tests2.d [new file with mode: 0644]
libphobos/src/std/socket.d
libphobos/src/std/typecons.d
libphobos/src/std/zip.d
libphobos/testsuite/libphobos.exceptions/chain.d
libphobos/testsuite/libphobos.exceptions/line_trace.d