Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1000 Bytes

compiler-warning-level-1-c4138.md

File metadata and controls

39 lines (32 loc) · 1000 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4138
Compiler Warning (level 1) C4138
11/04/2016
C4138
C4138
65ebf929-bba0-4237-923b-c1b66adfe17d

Compiler Warning (level 1) C4138

'*/' found outside of comment

The closing-comment delimiter is not preceded by an opening-comment delimiter. The compiler assumes a space between the asterisk (*) and the forward slash (/).

Example

// C4138a.cpp
// compile with: /W1
int */*comment*/ptr;   // C4138 Ambiguous first delimiter causes warning
int main()
{
}

This warning can be caused by trying to nest comments.

This warning may be resolved if you comment out sections of code that contain comments, enclose the code in an #if/#endif block, and set the controlling expression to zero:

// C4138b.cpp
// compile with: /W1
#if 0
int my_variable;   /* Declaration currently not needed */
#endif
int main()
{
}