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

1.27.0 Compiler Options: no-redzone option (Is the explanation backwards?) #51663

Open
gbutler69 opened this issue Jun 20, 2018 · 4 comments
Open
Assignees
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@gbutler69
Copy link

In the 1.27.0 release of the "Rustc Book", the command-line option "no-redzone" is described as follows:

no-redzone

This flag allows you to disable the red zone. This flag can be passed many options:

To enable the red zone: y, yes or on.

To disable it: n, no, or off.

This sounds backwards. Should it be "no-redzone=yes" would disable the RedZone and "no-redzone=no" would enable the "RedZone"? If not, it seems like the command-line option is misnamed and should be "redzone" rather than "no-redzone".

@gbutler69 gbutler69 changed the title 1.27.0 Compiler Options: no-redzone option (Is the explanatio backwards?) 1.27.0 Compiler Options: no-redzone option (Is the explanation backwards?) Jun 20, 2018
@steveklabnik steveklabnik added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Jun 20, 2018
@steveklabnik steveklabnik self-assigned this Jun 20, 2018
@steveklabnik
Copy link
Member

And related, the target spec uses disable-redzone https://github.com/intermezzOS/kernel/blob/master/intermezzos.json#L12

@Manishearth
Copy link
Member

I think we should name it redzone=yes/no anyway, a negative flag makes sense if it's a simple boolean with no arguments whose existence always means "no", but this is a flag to which you pass a yes/no, so it should either be -Cno-redzone, or -Credzone=no/-Credzone=yes.

@roblabla
Copy link
Contributor

I personally believe a -Cno-redzone boolean flag would be the best way to go, as it clearly indicates that the default is that the redzone is present.

@steveklabnik steveklabnik added the P-medium Medium priority label Dec 27, 2018
@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 6, 2020
@hkBst
Copy link
Member

hkBst commented Mar 15, 2025

This flag allows you to disable the red zone. It takes one of the following values:

y, yes, on, true or no value: disable the red zone.
n, no, off or false: enable the red zone.

The default behaviour, if the flag is not specified, depends on the target.

So it seems this was fixed and can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants