Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 960 Bytes

compiler-warning-level-1-c4917.md

File metadata and controls

32 lines (25 loc) · 960 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4917
Compiler Warning (level 1) C4917
11/04/2016
C4917
C4917
c05e2610-4a5d-4f4b-a99b-c15fd7f1d5f1

Compiler Warning (level 1) C4917

'declarator' : a GUID can only be associated with a class, interface or namespace

A user-defined structure other than class, interface, or namespace cannot have a GUID.

This warning is off by default. See Compiler Warnings That Are Off by Default for more information.

Example

The following code sample generates C4917:

// C4917.cpp
// compile with: /W1
#pragma warning(default : 4917)
__declspec(uuid("00000000-0000-0000-0000-000000000001")) struct S
{
} s;   // C4917, don't put uuid on a struct

int main()
{
}