Skip to content

replace pragma once with include guards #466

Description

@datajake1999

When attempting to compile src/main.c with TCC (the Tiny C Compiler), I am getting the following errors:

In file included from main.c:1:
In file included from c:/tcc/include/clap/all.h:3:
In file included from c:/tcc/include/clap/clap.h:30:
In file included from c:/tcc/include/clap/factory/plugin-factory.h:3:
In file included from c:/tcc/include/clap/factory/../plugin.h:4:
In file included from c:/tcc/include/clap/factory/../host.h:3:
c:/tcc/include/clap/factory/../version.h:14: error: struct/union/enum already defined

As pragma once is a non-standard C extension, I feel using include guards will help with cross-compiler compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions