Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/error-messages/compiler-warnings/c5033.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Compiler warning C5033"
description: Describes the causes and fixes for compiler warning C5033.
description: "Describes the causes and fixes for compiler warning C5033."
ms.date: 05/03/2021
f1_keywords: ["C5033"]
helpviewer_keywords: ["C5033"]
Expand All @@ -9,10 +9,10 @@ helpviewer_keywords: ["C5033"]

> '*storage-class-keyword*' is no longer a supported storage class

The **`auto`** and **`register`** storage class keywords have been deprecated or removed from the C++ language.

## Remarks

The **`auto`** and **`register`** storage class keywords have been deprecated or removed from the C++ language.

**Visual Studio 2010 and later:** In C++11, the **`auto`** keyword is no longer a C++ storage-class specifier, and the **`register`** keyword is deprecated.

**Visual Studio 2017 version 15.7 and later:** (available in [`/std:c++17`](../../build/reference/std-specify-language-standard-version.md) mode and later): The **`register`** keyword is removed from the C++ language in C++17 and later standards.
Expand Down
2 changes: 1 addition & 1 deletion docs/error-messages/compiler-warnings/c5037.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Compiler warning C5037"
description: Describes the causes and fixes for compiler warning C5037.
description: "Describes the causes and fixes for compiler warning C5037."
ms.date: 04/18/2021
f1_keywords: ["C5037"]
helpviewer_keywords: ["C5037"]
Expand Down
2 changes: 1 addition & 1 deletion docs/error-messages/compiler-warnings/c5038.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Compiler Warning C5038"
description: Describes the causes and fixes for compiler warning C5038.
description: "Describes the causes and fixes for compiler warning C5038."
ms.date: 05/03/2021
f1_keywords: ["C5038"]
helpviewer_keywords: ["C5038"]
Expand Down
4 changes: 2 additions & 2 deletions docs/error-messages/compiler-warnings/c5045.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: Compiler Warning C5045"
title: "Compiler Warning C5045"
ms.date: "06/21/2018"
description: "Learn more about: Compiler Warning C5045"
ms.date: 06/21/2018
f1_keywords: ["C5045"]
helpviewer_keywords: ["C5045"]
---
Expand Down
6 changes: 3 additions & 3 deletions docs/error-messages/compiler-warnings/c5046.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: Compiler Warning (level 2) C5046"
title: "Compiler Warning C5046"
ms.date: "03/21/2019"
description: "Learn more about: Compiler Warning (level 2) C5046"
ms.date: 03/21/2019
f1_keywords: ["C5046"]
helpviewer_keywords: ["C5046"]
---
Expand All @@ -25,7 +25,7 @@ This warning is new in Visual Studio 2017 version 15.8.

## Example

This sample shows two C5046 warnings:
This example shows two C5046 warnings:

```cpp
// C5046p.cpp
Expand Down
2 changes: 1 addition & 1 deletion docs/error-messages/compiler-warnings/c5050.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Compiler Warning C5050"
description: Compiler warning C5050 description and solution.
description: "Compiler warning C5050 description and solution."
ms.date: 05/03/2021
f1_keywords: ["C5050"]
helpviewer_keywords: ["C5050"]
Expand Down
11 changes: 6 additions & 5 deletions docs/error-messages/compiler-warnings/compiler-warning-c4950.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
description: "Learn more about: Compiler Warning C4950"
title: "Compiler Warning C4950"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning C4950"
ms.date: 11/04/2016
f1_keywords: ["C4950"]
helpviewer_keywords: ["C4950"]
ms.assetid: 50226a5c-c664-4d09-ac59-e9e874ca244f
---
# Compiler Warning C4950

'type_or_member' : marked as obsolete
> 'type_or_member' : marked as obsolete

## Remarks

A member or type was marked as obsolete with the <xref:System.ObsoleteAttribute> attribute.

C4950 is always issued as an error. You can turn off this warning by using the [warning](../../preprocessor/warning.md) pragma directive or the [/wd](../../build/reference/compiler-option-warning-level.md) compiler option.

## Example

The following sample generates C4950:
The following example generates C4950:

```cpp
// C4950.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: Compiler Warning C4956"
title: "Compiler Warning C4956"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning C4956"
ms.date: 11/04/2016
f1_keywords: ["C4956"]
helpviewer_keywords: ["C4956"]
ms.assetid: 9154f2d1-d49f-4e07-90d2-0e9bc028011a
---
# Compiler Warning C4956

Expand All @@ -20,7 +19,7 @@ This warning is issued as an error and can be disabled with the [warning](../../

## Example

The following sample generates C4956:
The following example generates C4956:

```cpp
// C4956.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: Compiler Warning C4957"
title: "Compiler Warning C4957"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning C4957"
ms.date: 11/04/2016
f1_keywords: ["C4957"]
helpviewer_keywords: ["C4957"]
ms.assetid: a18c52d4-23e2-44f1-b4b5-f7fa5a7f3987
---
# Compiler Warning C4957

Expand All @@ -24,7 +23,7 @@ This warning is issued as an error and can be disabled with the [warning](../../

## Example

The following sample generates C4957:
The following example generates C4957:

```cpp
// C4957.cpp
Expand Down
11 changes: 5 additions & 6 deletions docs/error-messages/compiler-warnings/compiler-warning-c4958.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: Compiler Warning C4958"
title: "Compiler Warning C4958"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning C4958"
ms.date: 11/04/2016
f1_keywords: ["C4958"]
helpviewer_keywords: ["C4958"]
ms.assetid: e79b9e9c-d572-4a3a-a3b6-60962b70864a
---
# Compiler Warning C4958

Expand All @@ -20,9 +19,9 @@ The **/clr:safe** compiler option is deprecated in Visual Studio 2015 and unsupp

This warning is issued as an error and can be disabled with the [warning](../../preprocessor/warning.md) pragma or the [/wd](../../build/reference/compiler-option-warning-level.md) compiler option.

## Example
## Examples

The following sample generates C4958:
The following example generates C4958:

```cpp
// C4958.cpp
Expand All @@ -39,7 +38,7 @@ int main( ) {

The compiler implements array operations with pointer arithmetic. Therefore, native arrays are not verifiable; use a CLR array instead. For more information, see [array](../../extensions/arrays-cpp-component-extensions.md).

The following sample generates C4958:
The following example generates C4958:

```cpp
// C4958b.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: Compiler Warning C4959"
title: "Compiler Warning C4959"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning C4959"
ms.date: 11/04/2016
f1_keywords: ["C4959"]
helpviewer_keywords: ["C4959"]
ms.assetid: 3a128f3e-4d8a-4565-ba1a-5d32fdeb5982
---
# Compiler Warning C4959

Expand All @@ -22,7 +21,7 @@ This warning is issued as an error and can be disabled with the [warning](../../

## Example

The following sample generates C4959:
The following example generates C4959:

```cpp
// C4959.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
description: "Learn more about: Compiler Warning C4961"
title: "Compiler Warning C4961"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning C4961"
ms.date: 11/04/2016
f1_keywords: ["C4961"]
helpviewer_keywords: ["C4961"]
ms.assetid: fe22d99f-5a12-45d3-a7cf-867773a71e16
---
# Compiler Warning C4961

No profile data was merged into '.pgd file', profile-guided optimizations disabled
> No profile data was merged into '.pgd file', profile-guided optimizations disabled

## Remarks

No profile data (.pgc files) were available, so profile-guided optimizations cannot take place.
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
description: "Learn more about: Compiler Warning C4962"
title: "Compiler Warning C4962"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning C4962"
ms.date: 11/04/2016
f1_keywords: ["C4962"]
helpviewer_keywords: ["C4962"]
ms.assetid: 62b156fe-04e5-4a6e-9339-6ab148185f87
---
# Compiler Warning C4962

'function' : Profile-guided optimizations disabled because optimizations caused profile data to become inconsistent"
> 'function' : Profile-guided optimizations disabled because optimizations caused profile data to become inconsistent"

## Remarks

A function was not compiled with /LTCG:PGO, because count (profile) data for the function was unreliable. Redo profiling to regenerate the .pgc file that contains the unreliable profile data for that function.

Expand Down
11 changes: 6 additions & 5 deletions docs/error-messages/compiler-warnings/compiler-warning-c4972.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
description: "Learn more about: Compiler Warning C4972"
title: "Compiler Warning C4972"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning C4972"
ms.date: 11/04/2016
f1_keywords: ["C4972"]
helpviewer_keywords: ["C4972"]
ms.assetid: d18e8e65-b2ef-4d75-a207-fbd0c17c9060
---
# Compiler Warning C4972

Directly modifying or treating the result of an unbox operation as an lvalue is unverifiable
> Directly modifying or treating the result of an unbox operation as an lvalue is unverifiable

## Remarks

Dereferencing a handle to a value type, also known as unboxing, and then assigning to it is not verifiable.

For more information, see [Boxing](../../extensions/boxing-cpp-component-extensions.md).

## Example

The following sample generates C4972.
The following example generates C4972.

```cpp
// C4972.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: Compiler Warning C4984"
title: "Compiler Warning C4984"
ms.date: "08/19/2019"
description: "Learn more about: Compiler Warning C4984"
ms.date: 08/19/2019
f1_keywords: ["C4984"]
helpviewer_keywords: ["C4984"]
---
Expand All @@ -19,7 +19,7 @@ This warning is available starting in Visual Studio 2017 version 15.3. For infor

## Example

This sample generates C4984, and shows ways to fix it:
This example generates C4984, and shows ways to fix it:

```cpp
// C4984.cpp
Expand Down
15 changes: 8 additions & 7 deletions docs/error-messages/compiler-warnings/compiler-warning-c4986.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
description: "Learn more about: Compiler Warning C4986"
title: "Compiler Warning C4986"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning C4986"
ms.date: 11/04/2016
f1_keywords: ["C4986"]
helpviewer_keywords: ["C4986"]
ms.assetid: a3a7b008-29dd-4203-85f3-7740ab6790bb
---
# Compiler Warning C4986

'function': exception specification does not match previous declaration
> 'function': exception specification does not match previous declaration

## Remarks

This warning can be generated when there is an exception specification in one declaration and not the other.

By default, C4986 is off. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md).

## Examples
## Example

The following sample generates C4986.
The following example generates C4986.

```cpp
class X { };
Expand All @@ -28,7 +29,7 @@ void f1()
}
```

The following sample eliminates this warning.
The following example eliminates this warning.

```cpp
class X { };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description: "Learn more about: Compiler Warning (level 1 and level 4) C4949"
title: "Compiler Warning (level 1 and level 4) C4949"
ms.date: "11/04/2016"
description: "Learn more about: Compiler Warning (level 1 and level 4) C4949"
ms.date: 11/04/2016
f1_keywords: ["C4949"]
helpviewer_keywords: ["C4949"]
ms.assetid: 34f45a05-c115-49cb-9f67-0bd4f0735d9b
---
# Compiler Warning (level 1 and level 4) C4949

pragmas 'managed' and 'unmanaged' are meaningful only when compiled with '/clr[:option]'
> pragmas 'managed' and 'unmanaged' are meaningful only when compiled with '/clr[:option]'

## Remarks

The compiler ignores the [managed](../../preprocessor/managed-unmanaged.md) and unmanaged pragmas if the source code is not compiled with [/clr](../../build/reference/clr-common-language-runtime-compilation.md). This warning is informational.

The following sample generates C4949:
## Example

The following example generates C4949:

```cpp
// C4949.cpp
Expand All @@ -22,7 +25,7 @@ The following sample generates C4949:

When **#pragma unmanaged** is used without **/clr**, C4949 is a level 4 warning.

The following sample generates C4949:
The following example generates C4949:

```cpp
// C4949b.cpp
Expand Down
Loading