dmd D Programming Language compiler
Find a file
drpriver 7dd0506aaf
Fix #21150 - ImportC: alignment value expected, not _Alignof (#21180)
The gnu attribute aligned() allows specifying the alignment of an entire
struct, mostly as a syntatic convenience. This attribute allows
compile-time integer expressions, but the parser was trying to evaluate them
ahead of time by checking for an integer literal. Instead we need to
preserve the expression and defer it to a later semantic stage.
Accomplish this by emulating the behavior by specifying the alignment of
the first member of the struct.

I didn't change how __declspec(align(#)) parses as from the
documentation it seems to only allow integer literals. Some light
testing with cl.exe gives syntax errors when trying to use _Alignof() in
that position.
2025-04-09 10:59:26 +08:00
.azure-pipelines Get rid of obsolete DMC special cases 2024-05-25 19:34:44 +02:00
.circleci CI: Adapt to generic Makefile for Phobos 2023-12-18 17:10:31 +08:00
.github/workflows GHA main: Add Alpine Linux job, to CI-test musl libc (#20741) 2025-01-28 00:28:20 +01:00
changelog merge stable (#21127) 2025-03-31 15:54:53 +02:00
ci GHA main: Add Alpine Linux job, to CI-test musl libc (#20741) 2025-01-28 00:28:20 +01:00
compiler Fix #21150 - ImportC: alignment value expected, not _Alignof (#21180) 2025-04-09 10:59:26 +08:00
druntime Turn macro translations into template functions (#21108) 2025-03-29 06:31:49 +08:00
src Convert posix.mak to generic Makefile 2023-12-09 15:59:14 +01:00
.cirrus.yml Cirrus CI: Allow single remaining FreeBSD coverage job to fail (might be out of credits) 2023-10-29 02:40:10 +01:00
.codecov.yml
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore Refactored memcpy calls to D slices (#21062) 2025-03-24 07:12:13 +08:00
.pre-commit-config.yaml
azure-pipelines.yml Kill off OMF support 2024-05-03 18:24:36 +12:00
CODEOWNERS
config.d dub build: Fix cross-compilation 2024-07-28 09:01:09 +08:00
CONTRIBUTING.md Update the contributor guide, remove bugzilla references (#20591) 2024-12-23 20:18:16 +08:00
dub.sdl Fix dub file for dscanner (#20978) 2025-03-12 07:29:09 +08:00
LICENSE.txt
Makefile Remove 'samples' folder 2025-01-11 08:12:48 +08:00
posix.mak Restore posix.mak, forwarding to generic Makefile 2023-12-09 15:59:14 +01:00
README.md Remove 'samples' folder 2025-01-11 08:12:48 +08:00
VERSION merge stable (#21127) 2025-03-31 15:54:53 +02:00

dlang logo

DMD

GitHub tag Code coverage license

Build status CircleCI Build Status Buildkite


DMD is the reference compiler for the D programming language.

Releases, language specification and other resources can be found on the homepage. Please refer to the guidelines for bug reports to report a problem or browse the list of open bugs.

Overview

This repository is structured into the following directories. Refer to their respective README.md for more in-depth information.

Directory Description
changelog changelog entries for the upcoming release
ci CI related scripts / utilities
compiler root of all compiler (DMD/frontend) related code
compiler/src source code, build system and build instructions
compiler/test tests and testing infrastructure
compiler/docs man pages and internal documentation
compiler/ini predefined dmd.conf files
druntime root of all runtime related code

With a D compiler and dub installed, dmd can be built with:

dub build dmd:compiler

For more information regarding compiling, installing, and hacking on DMD, check the contribution guide and visit the D Wiki.

Nightlies

Nightly builds based of the current DMD / Phobos master branch can be found here.