Skip to content

#if define checks #1

@USSRcoder

Description

@USSRcoder

tt.c

#include "tt.h"
#include "tt.h"

tt.h

#define PRINT_NUMERIC_ID 1
#if PRINT_NUMERIC_ID == 0
            1
#elif PRINT_NUMERIC_ID == 1
            2
#endif
#undef PRINT_NUMERIC_ID

mcc -a -i -E t.c > log

Work incorectly; it cut full block of full define, with some error:
Error: Lone #endif directive
Error: Lone #endif directive

this work fine:
tt.h

#define PRINT_NUMERIC_ID0
#ifdef PRINT_NUMERIC_ID0
            1
#endif
#ifdef PRINT_NUMERIC_ID1
            2
#endif

p.s. maybe it my mistake, because source has been updating, for compiling in msvc, and unrolling _Generic and PRINT macros; can't run it under gcc/mingw;

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