Skip to content

Commit 65b36f9

Browse files
authored
Merge pull request #5450 from Rageking8/update-main-functions-with-omitted-int-return-type
Update `main` functions with omitted `int` return type
2 parents 4e3ab75 + 02f7e73 commit 65b36f9

File tree

5 files changed

+17
-22
lines changed

5 files changed

+17
-22
lines changed

docs/error-messages/compiler-errors-1/compiler-error-c2086.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Error C2086"
32
title: "Compiler Error C2086"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2086"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2086"]
66
helpviewer_keywords: ["C2086"]
7-
ms.assetid: 4329bf72-90c8-444c-8524-4ef75e6b2139
87
---
98
# Compiler Error C2086
109

@@ -18,7 +17,7 @@ The following sample generates C2086:
1817

1918
```cpp
2019
// C2086.cpp
21-
main() {
20+
int main() {
2221
int a;
2322
int a; // C2086 not an error in ANSI C
2423
}

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4744.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Warning (Level 1) C4744"
32
title: "Compiler Warning (Level 1) C4744"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (Level 1) C4744"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4744"]
66
helpviewer_keywords: ["C4744"]
7-
ms.assetid: f2a7d0b5-afd5-4926-abc3-cfbd367e3ff5
87
---
98
# Compiler Warning (Level 1) C4744
109

@@ -37,7 +36,7 @@ The following sample generates C4744.
3736

3837
extern unsigned global;
3938

40-
main()
39+
int main()
4140
{
4241
printf_s("%d\n", global);
4342
}

docs/error-messages/tool-errors/math-error-m6111.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Math Error M6111"
32
title: "Math Error M6111"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Math Error M6111"
4+
ms.date: 11/04/2016
55
f1_keywords: ["M6111"]
66
helpviewer_keywords: ["M6111"]
7-
ms.assetid: c0fc13f8-33c8-4e3f-a440-126cc623441b
87
---
98
# Math Error M6111
109

@@ -14,9 +13,9 @@ A floating-point operation resulted in a stack underflow on the 8087/287/387 cop
1413

1514
This error is often caused by a call to a **`long double`** function that does not return a value. For example, the following generates this error when compiled and run:
1615

17-
```
16+
```c
1817
long double ld() {};
19-
main ()
18+
int main ()
2019
{
2120
ld();
2221
}

docs/intrinsics/debugbreak.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: __debugbreak"
32
title: "__debugbreak"
4-
ms.date: "09/02/2019"
3+
description: "Learn more about: __debugbreak"
4+
ms.date: 09/02/2019
55
f1_keywords: ["__debugbreak_cpp", "__debugbreak"]
66
helpviewer_keywords: ["breakpoints, __debugbreak intrinsic", "__debugbreak intrinsic"]
7-
ms.assetid: 1d1e1c0c-891a-4613-ae4b-d790094ba830
87
---
98
# __debugbreak
109

@@ -34,15 +33,15 @@ The `__debugbreak` compiler intrinsic, similar to [DebugBreak](/windows/win32/ap
3433
For example:
3534

3635
```C
37-
main() {
36+
int main() {
3837
__debugbreak();
3938
}
4039
```
4140

4241
is similar to:
4342

4443
```C
45-
main() {
44+
int main() {
4645
__asm {
4746
int 3
4847
}

docs/parallel/openmp/a-examples.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
2-
description: "Learn more about: A. Examples"
32
title: "A. Examples"
4-
ms.date: "01/18/2019"
5-
ms.assetid: c0f6192f-a205-449b-b84c-cb30dbcc8b8f
3+
description: "Learn more about: A. Examples"
4+
ms.date: 01/18/2019
65
---
76
# A. Examples
87

@@ -854,7 +853,7 @@ The following example demonstrates the [num_threads](2-directives.md#23-parallel
854853
855854
```cpp
856855
#include <omp.h>
857-
main()
856+
int main()
858857
{
859858
omp_set_dynamic(1);
860859
...

0 commit comments

Comments
 (0)