Skip to content

Clarify int main(void) example #3377

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 2 commits into from
Sep 20, 2021
Merged

Conversation

workingjubilee
Copy link
Contributor

The semicolon can elicit a syntax error from C compilers such as MSVC.
Specifying a return is useful: in ISO C ("C99") and later, the return 0; is implied.
However, in ANSI C (AKA "C89") the compiler is not required to add return 0;.
This document references ANSI C, so clarity on the matter and consistent style is best.
Also, it is best to identify the struct with the bit layout in question.

The semicolon can elicit a syntax error from C compilers such as MSVC.
Specifying a return is useful: in ISO C ("C99") and later, the `return 0;` is implied.
However, in ANSI C (AKA "C89") the compiler is not required to add `return 0;`.
This document references ANSI C, so clarity on the matter and consistent style is best.
Also, it is best to identify the struct with the bit layout in question.
@PRMerger14
Copy link
Contributor

@workingjubilee : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@ktoliver
Copy link
Contributor

#label:"aq-pr-triaged"

@PRMerger12 PRMerger12 added the aq-pr-triaged Tracking label for the PR review team label Sep 20, 2021
@PRMerger18
Copy link
Contributor

@corob-msft : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Contributor

@colin-home colin-home left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@workingjubilee
Thanks for the update.

@colin-home colin-home merged commit 73688e9 into MicrosoftDocs:master Sep 20, 2021
@workingjubilee workingjubilee deleted the patch-3 branch September 21, 2021 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants