Skip to content

malloc(sizeof * p) ?: ({goto end; nullptr;}); #399

@thradams

Description

@thradams

I believe the following code is not producing the expected result or diagnostics.

#include <stdio.h>
#include <stdlib.h>

int main(void) {
    int * p = malloc(sizeof * p) ?: ({goto end; nullptr;});

    end:
    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions