Skip to content

ARM interrupt attribute warning incorrect for M-profile #47815

Open
@john-brawn-arm

Description

@john-brawn-arm
Bugzilla Link 48471
Version trunk
OS Windows NT
CC @zygoloid

Extended Description

If you compile the following

extern void fn(void);
attribute((interrupt)) void example(void) {
fn();
return;
}

with --target=arm-none-eabi -mcpu=cortex-m7 you get

tmp.c:3:3: warning: call to function without interrupt attribute could clobber interruptee's VFP registers [-Wextra]
fn();
^

This warning is incorrect for M-profile CPUs, as VFP registers are automatically saved and later restored in M-profile CPUs when entering an exception (or when a VFP register is modified in an exception handler if lazy context save is enabled).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions