-
Notifications
You must be signed in to change notification settings - Fork 818
Open
Labels
bugBug, regression, crashBug, regression, crash
Milestone
Description
Description
When using DXC headers with clang compiler, headers fail to compile if C++ extensions were explicitly disabled.
Steps to Reproduce
- In CMake project, set
CMAKE_CXX_EXTENSIONStoOFF - Include WinAdapter.h in that same CMake project
- Try to build the project and observe compile error
Not tested on Linux, but same bug likely exists there as well.
Workaround is to add #define __EMULATE_UUID 1 before including any DXC headers.
Actual Behavior
When including WinAdapter.h, line CROSS_PLATFORM_UUIDOF(IUnknown, "00000000-0000-0000-C000-000000000046") produces following errors:
error: expected parameter declarator
572 | CROSS_PLATFORM_UUIDOF(IUnknown, "00000000-0000-0000-C000-000000000046")
REDACTED/DXC/inc/WinAdapter.h:572:33: error: expected ')'
REDACTED/DXC/inc/WinAdapter.h:572:1: note: to match this '('
572 | CROSS_PLATFORM_UUIDOF(IUnknown, "00000000-0000-0000-C000-000000000046")
REDACTED/DXC/inc/WinAdapter.h:552:25: note: expanded from macro 'CROSS_PLATFORM_UUIDOF'
552 | struct __declspec(uuid(spec)) interface;
| ^
REDACTED/DXC/inc/WinAdapter.h:572:23: error: expected function body after function declarator
572 | CROSS_PLATFORM_UUIDOF(IUnknown, "00000000-0000-0000-C000-000000000046")
Environment
- DXC version - v1.8.2502
- Host Operating System - macOS 15.4
- Compiler - AppleClang 17.0.0.17000013
Metadata
Metadata
Assignees
Labels
bugBug, regression, crashBug, regression, crash
Type
Projects
Status
Triaged