https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113873
Bug ID: 113873 Summary: false warning about #pragma once Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jadexradex at gmail dot com Target Milestone: --- If you create an empty file with C/C++ extension and write "#pragma once", it will show warning "#pragma once in main file". However, this file does not have any code or entry point. So this message may be misleading.