Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add __attribute__((noreturn,cold)) for _mi_assert_fail #134586

Copy link
Copy link
Open
@picnixz

Description

@picnixz
Issue body actions

Feature or enhancement

Note

I already have a PR ready in case this is accepted

Proposal:

Because _mi_assert_fail is not marked as a noreturn function, the assertion is not understood by CLion and I have some false positives telling me "this ptr is not NULL" while just above there is mi_assert(ptr != NULL);. To improve IDE's analysis, I suggest to mark _mi_assert_fail with __attribute__((noreturn)) and __THROW for GCC, the same attributes that are put on __assert_fail:

extern void __assert_fail (const char *__assertion, const char *__file,
			   unsigned int __line, const char *__function)
     __THROW __attribute__ ((__noreturn__));

cc @colesbury

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.