Skip to content

Update compiler-limits.md #4505

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 3 commits into from
Jun 5, 2023
Merged
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
7 changes: 3 additions & 4 deletions docs/cpp/compiler-limits.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
---
description: "Learn more about: Compiler Limits"
title: "Compiler Limits"
ms.date: "05/06/2019"
ms.date: "06/05/2023"
helpviewer_keywords: ["cl.exe compiler, limits for language constructs"]
ms.assetid: f1fa59c6-55b4-414b-80c5-3df72952160d
---
# Compiler Limits

The C++ standard recommends limits for various language constructs. The following is a list of cases where the Microsoft C++ compiler does not implement the recommended limits. The first number is the limit that is established in the ISO C++ 11 standard (INCITS/ISO/IEC 14882-2011[2012], Annex B) and the second number is the limit implemented by the Microsoft C++ compiler:

- Nesting levels of compound statements, iteration control structures, and selection control structures - C++ standard: 256, Microsoft C++ compiler: depends on the combination of statements that are nested, but generally between 100 and 110.

- Parameters in one macro definition - C++ standard: 256, Microsoft C++ compiler: 127.
- Parameters in one macro definition - C++ standard: 256, Microsoft C++ compiler using `/Zc:preprocessor-`:127 or using `/Zc:preprocessor`:32767.

- Arguments in one macro invocation - C++ standard: 256, Microsoft C++ compiler 127.
- Arguments in one macro invocation - C++ standard: 256, Microsoft C++ compiler using `/Zc:preprocessor-`:127 or using `/Zc:preprocessor`:32767.

- Characters in a character string literal or wide string literal (after concatenation) - C++ standard: 65536, Microsoft C++ compiler: 65535 single-byte characters, including the NULL terminator, and 32767 double-byte characters, including the NULL terminator.

Expand Down