Skip to content

cstack lint ignores #[fixed_stack_segment] on default methods #8753

Closed

Description

rustc version: rustc 0.8-pre (05f1bbb 2013-08-25 12:26:16 -0700)

Code:

extern "C"
{
    fn a();
}

trait A
{
    #[fixed_stack_segment]
    fn foo()
    {
        unsafe
        {
            a();
        }
    }
}

fn main()
{
}

Error:

test.rs:13:3: 13:4 error: invoking non-Rust fn in fn without #[fixed_stack_segment] [-D cstack (default)]
test.rs:13                      a();
                                ^
error: aborting due to previous error

Note that I'm not sure the attribute is being applied correctly, in which case the lint is correctly identifying the issue and the bug is elsewhere... I don't know how to verify this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions