Skip to content

SLANG_DISABLE_EXCEPTIONS does not compile #12779

Description

@pdeayton-nv

Issue Description

Slang does not compile when SLANG_DISABLE_EXCEPTIONS is defined and C++ exceptions are disabled.

Reproducer Code

From a checkout with submodules initialized:

g++ -std=c++20 -fno-exceptions -DSLANG_DISABLE_EXCEPTIONS=1 \
  -Iinclude -Isource -Iexternal/unordered_dense/include \
  -c source/core/slang-token-reader.cpp

Expected Behavior

Slang compiles successfully when SLANG_DISABLE_EXCEPTIONS is defined and the toolchain has C++ exception support disabled.

Actual Behavior

source/core/slang-token-reader.h:176:70: error: exception handling disabled, use ‘-fexceptions’ to enable

Environment

  • Slang: v2026.16-31-gc1cffad25

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Dev OpenedreproducedProvided instructions confirmed to reproduce the issue

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions