Skip to content

Repo sync for protected branch #5001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
cc18e22
Learn Editor: Update compiler-warning-level-3-c4334.md
Rastaban Mar 7, 2024
59c2423
Learn Editor: Update compiler-warning-level-3-c4334.md
Rastaban Mar 7, 2024
9ca5022
Learn Editor: Update compiler-warning-level-3-c4334.md
Rastaban Mar 7, 2024
b247b40
Learn Editor: Update compiler-warning-level-3-c4334.md
Rastaban Mar 7, 2024
e9fa361
Learn Editor: Update compiler-warning-level-3-c4334.md
Rastaban Mar 7, 2024
b15421f
Learn Editor: Update compiler-warnings-c4400-through-c4599.md
Rastaban Mar 9, 2024
91aceee
Learn Editor: Update compiler-warnings-c4400-through-c4599.md
Rastaban Mar 11, 2024
784ac26
Learn Editor: Update compiler-warnings-c4400-through-c4599.md
Rastaban Mar 11, 2024
bfcd46a
Update compiler-warnings-c4400-through-c4599.md
Rastaban Mar 11, 2024
1526ba5
Learn Editor: Update compiler-warnings-c4600-through-c4799.md
Rastaban Mar 20, 2024
8cddb61
Learn Editor: Update compiler-warnings-c4600-through-c4799.md
Rastaban Mar 20, 2024
680e3d2
Learn Editor: Update compiler-warnings-c4600-through-c4799.md
Rastaban Mar 20, 2024
b4682e2
Merge pull request #5486 from Rastaban/docs-editor/compiler-warning-l…
Mar 26, 2024
200bf35
Merge pull request #5493 from Rastaban/docs-editor/compiler-warnings-…
Mar 26, 2024
86d391a
Merge pull request #5507 from Rastaban/docs-editor/compiler-warnings-…
v-dirichards Mar 26, 2024
5505d70
address perf (#5515)
TylerMSFT Mar 26, 2024
6382bc4
Merge pull request #5519 from MicrosoftDocs/main
Albertyang0 Mar 27, 2024
eeb7153
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs…
Mar 27, 2024
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
5 changes: 5 additions & 0 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"redirections": [
{
"source_path": "docs/windows/desktop-applications-visual-cpp.md",
"redirect_url": "/cpp/windows/overview-of-windows-programming-in-cpp",
"redirect_document_id": true
},
{
"source_path": "docs/cpp-conformance-improvements-2017.md",
"redirect_url": "/cpp/overview/cpp-conformance-improvements",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,5 +290,4 @@ The instructions for how to create the project vary depending on your version of

## See also

[Walkthrough: Creating and Using a Dynamic Link Library (C++)](../build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md)<br/>
[Desktop Applications (Visual C++)](../windows/desktop-applications-visual-cpp.md)<br/>
[Walkthrough: Creating and Using a Dynamic Link Library (C++)](../build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md)
4 changes: 2 additions & 2 deletions docs/cpp/index.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:Landing
title: C++ language documentation
title: C++ documentation
summary: Learn to use C++ and the C++ standard library.

metadata:
Expand Down Expand Up @@ -76,7 +76,7 @@ landingContent:
url: ../build/reference/compiling-a-c-cpp-program.md
- text: Linker reference
url: ../build/reference/linking.md
- text: Additional build tools
- text: More build tools
url: ../build/reference/c-cpp-build-tools.md
- text: Errors and warnings
url: ../error-messages/compiler-errors-1/c-cpp-build-errors.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ ms.assetid: d845857f-bc95-4faf-a079-626a0cf935ba
---
# Compiler Warning (level 3) C4334

'operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
'operator': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)

The result of 32-bit shift was implicitly converted to 64-bits, and the compiler suspects that a 64-bit shift was intended. To resolve this warning, either use 64-bit shift, or explicitly cast the shift result to 64-bit.
The result of 32-bit shift was converted to 64-bit, and the compiler suspects that a 64-bit shift was intended. Resolve this warning by using a 64-bit shift. If a 32-bit shift is intentional, then cast the shift result to 32-bit to make it clear to the compiler.

## Example

Expand All @@ -20,7 +20,9 @@ The following sample generates C4334.
// C4334.cpp
// compile with: /W3 /c
void SetBit(unsigned __int64 *p, int i) {
*p |= (1 << i); // C4334
*p |= (1i64 << i); // OK
*p |= (1 << i); // C4334, 32-bit shift cast to 64-bit
*p |= (1i64 << i); // OK, 64-bit shift
*p |= static_cast<int>(1 << i); // OK, 32-bit shift saved to 64-bit result
*p |= static_cast<__int64>(1) << i; // OK, 64-bit shift
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ The articles in this section of the documentation explain a subset of the warnin
|[Compiler warning (level 1, Error) C4462](../../error-messages/compiler-warnings/compiler-warning-level-1-c4462.md)|'*type*' : cannot determine the GUID of the type. Program may fail at runtime.|
|[Compiler warning (level 4) C4463](compiler-warning-level-4-c4463.md)|overflow; assigning '*value*' to bit-field that can only hold values from '*min_value*' to '*max_value*'|
|[Compiler warning (level 4) C4464](../../error-messages/compiler-warnings/compiler-warning-level-4-c4464.md)|relative include path contains '..'|
|Compiler warning (level 1) C4467|Usage of ATL attributes is deprecated|
|Compiler warning (level 1) C4468|The [[fallthrough]] attribute must be followed by a `case` label or a `default` label|
|[Compiler warning (level 1) C4470](../../error-messages/compiler-warnings/compiler-warning-level-1-c4470.md)|floating-point control pragmas ignored under /clr|
|[Compiler warning (level 4) C4471](compiler-warning-level-4-c4471.md)|'*enumeration*': a forward declaration of an unscoped enumeration must have an underlying type (int assumed)|
|Compiler warning (level 1) C4472|'*identifier*' is a native enum: add an access specifier (private/public) to declare a 'WinRT\|managed' enum|
Expand Down Expand Up @@ -149,7 +151,7 @@ The articles in this section of the documentation explain a subset of the warnin
|[Compiler warning (level 1) C4550](../../error-messages/compiler-warnings/compiler-warning-level-1-c4550.md)|expression evaluates to a function which is missing an argument list|
|[Compiler warning (level 1) C4551](../../error-messages/compiler-warnings/compiler-warning-level-1-c4551.md)|function call missing argument list|
|[Compiler warning (level 1) C4552](../../error-messages/compiler-warnings/compiler-warning-level-1-c4552.md)|'*operator*': operator has no effect; expected operator with side-effect|
|[Compiler warning (level 1) C4553](../../error-messages/compiler-warnings/compiler-warning-level-1-c4553.md)|'*operator*': operator has no effect; did you intend 'operator?|
|[Compiler warning (level 1) C4553](../../error-messages/compiler-warnings/compiler-warning-level-1-c4553.md)|'*operator*': operator has no effect; did you intend 'operator'?|
|[Compiler warning (level 3) C4554](../../error-messages/compiler-warnings/compiler-warning-level-3-c4554.md) C4554|'*operator*': check operator precedence for possible error; use parentheses to clarify precedence|
|[Compiler warning (level 1) C4555](../../error-messages/compiler-warnings/compiler-warning-level-1-c4555.md)|expression has no effect; expected expression with side-effect|
|[Compiler warning (level 1) C4556](../../error-messages/compiler-warnings/compiler-warning-level-1-c4556.md)|value of intrinsic immediate argument '*value*' is out of range '*lower_bound* - *upper_bound*'|
Expand Down Expand Up @@ -181,6 +183,7 @@ The articles in this section of the documentation explain a subset of the warnin
|Compiler warning (level 1, Error) C4586|'*type*': A public type cannot be declared in a top-level namespace called 'Windows'|
|Compiler warning (level 1) C4587|'*anonymous_structure*': behavior change: constructor is no longer implicitly called|
|Compiler warning (level 1) C4588|'*anonymous_structure*': behavior change: destructor is no longer implicitly called|
|Compiler warning (level 4) C4589|Constructor of abstract class '*class1*' ignores initializer for virtual base class '*class2*'|
|Compiler warning (level 1) C4591|'constexpr' call-depth limit of *number* exceeded (/constexpr:depth\<NUMBER>)|
|Compiler warning (level 3) C4592|'*function*': 'constexpr' call evaluation failed; function will be called at run-time|
|Compiler warning (level 1) C4593|'*function*': 'constexpr' call evaluation step limit of '*limit*' exceeded; use /constexpr:steps\<NUMBER> to increase the limit|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ The articles in this section of the documentation explain a subset of the warnin
|[Compiler warning (level 4) C4639](../../error-messages/compiler-warnings/compiler-warning-level-4-c4639.md)|MSXML error, XML document comments will not be processed. Reason|
|[Compiler warning (level 3) C4640](../../error-messages/compiler-warnings/compiler-warning-level-3-c4640.md)|'instance': construction of local static object is not thread-safe|
|[Compiler warning (level 3) C4641](../../error-messages/compiler-warnings/compiler-warning-level-3-c4641.md)|XML document comment has an ambiguous cross reference:|
|Compiler warning (level 1) C4642|'*class*': could not import the constraints for generic parameter '*name*'|
|Compiler warning (level 4, off) C4643|Forward declaring '*identifier*' in namespace std is not permitted by the C++ Standard.|
|Compiler warning (level 1) C4644|usage of the macro-based `offsetof` pattern in constant expressions is non-standard; use `offsetof` defined in the C++ standard library instead|
|[Compiler warning (level 3) C4645](compiler-warning-level-3-c4645.md)|function declared with __declspec(noreturn) has a return statement|
|[Compiler warning (level 3) C4646](compiler-warning-level-3-c4646.md)|function declared with __declspec(noreturn) has non-void return type|
|Compiler warning (level 3) C4647|behavior change: __is_pod(*type*) has different value in previous versions|
Expand Down Expand Up @@ -93,7 +96,7 @@ The articles in this section of the documentation explain a subset of the warnin
|[Compiler warning (Error) C4687](../../error-messages/compiler-warnings/compiler-warning-c4687.md)|'class': a sealed abstract class cannot implement an interface 'interface'|
|[Compiler warning (level 1) C4688](../../error-messages/compiler-warnings/compiler-warning-level-1-c4688.md)|'constraint': constraint list contains assembly private type 'type'|
|Compiler warning (level 1) C4689|'%c': unsupported character in #pragma detect_mismatch; #pragma ignored|
|[Compiler warning (level 4) C4690](../../error-messages/compiler-warnings/compiler-warning-level-4-c4690.md)|\[ emitidl( pop ) ]: more pops than pushes|
|[Compiler warning (level 4) C4690](../../error-messages/compiler-warnings/compiler-warning-level-4-c4690.md)|[ emitidl( pop ) ]: more pops than pushes|
|[Compiler warning (level 1) C4691](../../error-messages/compiler-warnings/compiler-warning-level-1-c4691.md)|'type': type referenced was expected in unreferenced assembly 'file', type defined in current translation unit used instead|
|[Compiler warning (level 1) C4692](../../error-messages/compiler-warnings/compiler-warning-level-1-c4692.md)|'function': signature of non-private member contains assembly private native type 'native_type'|
|[Compiler warning (level 1, Error) C4693](../../error-messages/compiler-warnings/compiler-warning-c4693.md)|'class': a sealed abstract class cannot have any instance members 'instance member'|
Expand Down Expand Up @@ -124,10 +127,12 @@ The articles in this section of the documentation explain a subset of the warnin
|[Compiler warning (level 1) C4727](../../error-messages/compiler-warnings/compiler-warning-level-1-c4727.md)|PCH named pch_file with same timestamp found in obj_file_1 and obj_file_2. Using first PCH.|
|Compiler warning (level 1) C4728|/Yl- option ignored because PCH reference is required|
|Compiler warning (level 4) C4729|function too big for flow graph based warnings|
|[Compiler warning (Level 1) C4730](../../error-messages/compiler-warnings/compiler-warning-level-1-c4730.md)Compiler warning (level 1) C4730|'main': mixing _m64 and floating point expressions may result in incorrect code|
|[Compiler warning (Level 1) C4730](../../error-messages/compiler-warnings/compiler-warning-level-1-c4730.md)|'main': mixing _m64 and floating point expressions may result in incorrect code|
|[Compiler warning (Level 1) C4731](../../error-messages/compiler-warnings/compiler-warning-level-1-c4731.md)|'pointer': frame pointer register 'register' modified by inline assembly code|
|Compiler warning (level 1) C4732|intrinsic '%s' is not supported in this architecture|
|[Compiler warning (Level 1) C4733](../../error-messages/compiler-warnings/compiler-warning-level-1-c4733.md)|Inline asm assigning to 'FS:0': handler not registered as safe handler|
|Compiler warning C4735|`align_function` attribute argument '*argument*' is not a power of two and is not positive. Ignoring attribute|
|Compiler warning C4736|`align_function` attribute ignored because `/Gy` was not specified|
|[Compiler warning (Level 3) C4738](../../error-messages/compiler-warnings/compiler-warning-level-3-c4738.md)|storing 32-bit float result in memory, possible loss of performance|
|[Compiler warning (level 1) C4739](compiler-warning-level-1-c4739.md)|reference to variable 'var' exceeds its storage space|
|[Compiler warning (Level 4) C4740](../../error-messages/compiler-warnings/compiler-warning-level-4-c4740.md)|flow in or out of inline asm code suppresses global optimization|
Expand All @@ -140,6 +145,7 @@ The articles in this section of the documentation explain a subset of the warnin
|[Compiler warning (level 1) C4750](compiler-warning-level-1-c4750.md)|'identifier': function with _alloca() inlined into a loop|
|Compiler warning (level 4) C4751|/arch:AVX does not apply to Intel(R) Streaming SIMD Extensions that are within inline ASM|
|Compiler warning (level 4) C4752|found Intel(R) Advanced Vector Extensions; consider using /arch:AVX|
|Compiler warning C4753|Cannot find bounds for pointer; MPX intrinsic function ignored|
|[Compiler warning (level 4) C4754](compiler-warning-level-4-c4754.md)|Conversion rules for arithmetic operations in the comparison at %s(%d) mean that one branch cannot be executed. Cast '%s' to '%s' (or similar type of %d bytes).|
|Compiler warning C4755|Conversion rules for arithmetic operations in the comparison at %s(%d) mean that one branch cannot be executed in an inlined function. Cast '%s' to '%s' (or similar type of %d bytes).|
|[Compiler warning (level 2) C4756](../../error-messages/compiler-warnings/compiler-warning-level-2-c4756.md)|overflow in constant arithmetic|
Expand All @@ -165,4 +171,4 @@ The articles in this section of the documentation explain a subset of the warnin
## See also

[C/C++ Compiler and build tools errors and warnings](../compiler-errors-1/c-cpp-build-errors.md) \
[Compiler warnings C4000 - C5999](compiler-warnings-c4000-c5999.md)
[Compiler warnings C4000 - C5999](compiler-warnings-c4000-c5999.md)
2 changes: 1 addition & 1 deletion docs/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ additionalContent:
- text: Universal Windows Platform development
url: cppcx/universal-windows-apps-cpp.md
- text: Windows Desktop development
url: ./windows/desktop-applications-visual-cpp.md
url: windows/overview-of-windows-programming-in-cpp.md
- text: Linux development
url: linux/index.yml
- text: Embedded development
Expand Down
6 changes: 3 additions & 3 deletions docs/overview/overview-of-cpp-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ If your program has a user interface, you can use a designer to quickly populate

![Screenshot of the Designer and Toolbox windows.](media/vs2017-toolbox-designer.png "Visual Studio 2017 Toolbox and designer")

For more information about designing a user interface for a Universal Windows Platform app, see [Design and UI](https://developer.microsoft.com/windows/design).

For more information about creating a user interface for an MFC application, see [MFC Desktop Applications](../mfc/mfc-desktop-applications.md). For information about Win32 Windows programs, see [Windows Desktop Applications](../windows/desktop-applications-visual-cpp.md).
- For more information about designing a user interface for a Universal Windows Platform app, see [Design and UI](https://developer.microsoft.com/windows/design).
- For more information about creating a user interface for an MFC application, see [MFC Desktop Applications](../mfc/mfc-desktop-applications.md).
- For information about Win32 Windows programs, see [Windows C++ desktop application types](../windows/overview-of-windows-programming-in-cpp.md).

## Write code

Expand Down
2 changes: 1 addition & 1 deletion docs/overview/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ items:
- name: Microsoft C/C++ in Visual Studio
expanded: false
items:
- name: C++ in Visual Studio
- name: C and C++ in Visual Studio
href: ../overview/visual-cpp-in-visual-studio.md
- name: Overview of C++ development in Visual Studio
href: ../overview/overview-of-cpp-development.md
Expand Down
2 changes: 1 addition & 1 deletion docs/overview/visual-cpp-in-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Create unit tests using the Microsoft Unit Testing Framework for C++, Google Tes

## Write C/C++ applications using Visual Studio

[Desktop applications (C++)](../windows/desktop-applications-visual-cpp.md)\
[Windows C++ desktop application types](../windows/overview-of-windows-programming-in-cpp.md)\
Learn how to create traditional native C++ desktop applications for Windows.

[.NET programming with C++/CLI](../dotnet/dotnet-programming-with-cpp-cli-visual-cpp.md)\
Expand Down
Loading