Skip to content

Unknown pragma codes in GCC #4599

@toms-visuality

Description

@toms-visuality

Describe the bug

Warning is issued when compiling msquic on Linux, since GCC does not know pragmas: 4201, 4214

Affected OS

  • Windows
  • Linux
  • macOS
  • Other (specify below)

Additional OS information

Linux Ubuntu 24.04 LTS, kernel 6.8.0-39
gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0

MsQuic version

v2.2

Steps taken to reproduce bug

  1. Compile msquic
  2. Warnings keep repeating:
    ../msquic/msquic.h:28: warning: ignoring #pragma warning [-Wunknown-pragmas] 28 | #pragma warning(disable:4201) // nonstandard extension used: nameless struct/union | ../msquic/msquic.h:29: warning: ignoring #pragma warning [-Wunknown-pragmas] 29 | #pragma warning(disable:4214) // nonstandard extension used: bit field types other than int

Expected behavior

No warnings should be visible.

Actual outcome

Warnings repeat constantly.

Additional details

Possible fix could be (on msquic.h:28-29):

#ifdef _MSC_VER
    #pragma warning(disable:4201)  // nonstandard extension used: nameless struct/union
    #pragma warning(disable:4214)  // nonstandard extension used: bit field types other than int
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions