Skip to content

Suppress MSVC C4200 warning in dnmd_pdb.h#67

Merged
AaronRobinsonMSFT merged 1 commit intomasterfrom
fix/suppress-c4200-dnmd-pdb
Mar 1, 2026
Merged

Suppress MSVC C4200 warning in dnmd_pdb.h#67
AaronRobinsonMSFT merged 1 commit intomasterfrom
fix/suppress-c4200-dnmd-pdb

Conversation

@AaronRobinsonMSFT
Copy link
Owner

The header uses flexible array members (zero-sized arrays) in md_sequence_points_t, md_local_constant_sig_t, and md_imports_t. MSVC warns about this (C4200), which breaks consumers that build with -Werror/WX. Matches the existing pattern in corhdr.h.

The header uses flexible array members (zero-sized arrays) in
md_sequence_points_t, md_local_constant_sig_t, and md_imports_t.
MSVC warns about this (C4200), which breaks consumers that build
with -Werror/WX. Matches the existing pattern in corhdr.h.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures the public dnmd_pdb.h header can be consumed by MSVC projects that treat warnings as errors by suppressing MSVC warning C4200 (triggered by flexible array members used in several structs).

Changes:

  • Add MSVC-only #pragma warning(push) + #pragma warning(disable:4200) near the top of dnmd_pdb.h
  • Add the corresponding MSVC-only #pragma warning(pop) near the end of dnmd_pdb.h

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit b3204df into master Mar 1, 2026
17 checks passed
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the fix/suppress-c4200-dnmd-pdb branch March 1, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants