Skip to content
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

document localPassC consistently with compiler; fix ANSI capitalization #19721

Merged
merged 1 commit into from
Apr 25, 2022
Merged

document localPassC consistently with compiler; fix ANSI capitalization #19721

merged 1 commit into from
Apr 25, 2022

Conversation

tersec
Copy link
Contributor

@tersec tersec commented Apr 13, 2022

Addresses the ANSI capitalization in nim-lang/website#279

Used the manual's example of localPassc:

{.localPassc: "-Wall -Werror".}

Compiled with:

nim c --stylecheck:error localpassc.nim

and got

localpassc.nim(1, 3) Error: 'localPassc' should be: 'localPassC'

Checked the capitalizations the compiler expected using versions:

Nim Compiler Version 1.6.4 [Linux: amd64]
Compiled at 2022-02-10
Copyright (c) 2006-2021 by Andreas Rumpf

active boot switches: -d:release
Nim Compiler Version 1.7.1 [Linux: amd64]
Compiled at 2022-04-13
Copyright (c) 2006-2022 by Andreas Rumpf

git hash: 98cebad7debddfb147ee22bc6f3d81221582c4d6
active boot switches: -d:release
{.localPassC: "-Wall -Werror".}

indeed works, stylecheck or otherwise.

So the compiler is expecting localPassC. Without stylecheck, it doesn't matter, but with stylecheck, the manual incorrectly specifies what the compiler will accept.

@Araq Araq merged commit 8e6136d into nim-lang:devel Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants