Skip to content

Make unreachable code dimmed #12902

Description

@mehlian

Feature Request

When using #if preprocessor directive with undefined symbol, whole code block is rendered as dimmed in vscode.

#if 0
int test() // whole code block is dimmed
{
    return 1;
}
#endif

Is it possible to make same effect for unreachable code?
In this case, lines bellow return could be dimmed as unreachable code.

int test1()
{
    return 1;
    int k = 10; // make this dimmed
}

This would prevent situations there we update unreachable code and don't see results after compilation.

Activity

  1. Colengms commented on Oct 30, 2024

    @Colengms
    Contributor

    Hi mehlian . Thanks for suggesting this.

  2. github-actions commented on Dec 29, 2024

    @github-actions

    This feature request is being closed due to insufficient upvotes. Please leave a 👍-upvote or 👎-downvote reaction on the issue to help us prioritize it. When enough upvotes are received, this issue will be eligible for our backlog.

  3. added this to the Triage milestone on Dec 29, 2024
  4. moved this from Done to Pull Request in cpptoolson Sep 23, 2026
  5. moved this from Pull Request to Done in cpptoolson Sep 25, 2026
  6. sean-mcmanus commented on Oct 7, 2026

    @sean-mcmanus
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Feature RequestLanguage ServicefixedCheck the Milestone for the release in which the fix is or will be available.

Type

No type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions