Skip to content

gnu::cleanup can call gnu::error function #146520

Open
@xBZZZZ

Description

@xBZZZZ

clang compiles this with no error:

[[gnu::error("error please")]]
void cleaner_function(char*);

void asdf(void){
	[[gnu::cleanup(cleaner_function)]]
	char x;
}

clang is x86_64 20.1.7 downloaded from https://mirrors.edge.kernel.org/pub/tools/llvm/

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second party

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions