[Bug target/96238] New: [i386] cpuid.h header needs include guards
thiago at kde dot org
gcc-bugzilla@gcc.gnu.org
Fri Jul 17 23:12:31 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96238
Bug ID: 96238
Summary: [i386] cpuid.h header needs include guards
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: thiago at kde dot org
Target Milestone: ---
$ cat x.c
#include <cpuid.h>
#include <cpuid.h>
$ gcc -c x.c
/usr/lib64/gcc/x86_64-suse-linux/10/include/cpuid.h:228:1: error: redefinition
of ‘__get_cpuid_max’
228 | __get_cpuid_max (unsigned int __ext, unsigned int *__sig)
| ^~~~~~~~~~~~~~~
In file included from <command-line>:32:
/usr/lib64/gcc/x86_64-suse-linux/10/include/cpuid.h:228:1: note: previous
definition of ‘__get_cpuid_max’ was here
228 | __get_cpuid_max (unsigned int __ext, unsigned int *__sig)
| ^~~~~~~~~~~~~~~
/usr/lib64/gcc/x86_64-suse-linux/10/include/cpuid.h:283:1: error: redefinition
of ‘__get_cpuid’
283 | __get_cpuid (unsigned int __leaf,
| ^~~~~~~~~~~
/usr/lib64/gcc/x86_64-suse-linux/10/include/cpuid.h:283:1: note: previous
definition of ‘__get_cpuid’ was here
283 | __get_cpuid (unsigned int __leaf,
| ^~~~~~~~~~~
/usr/lib64/gcc/x86_64-suse-linux/10/include/cpuid.h:300:1: error: redefinition
of ‘__get_cpuid_count’
300 | __get_cpuid_count (unsigned int __leaf, unsigned int __subleaf,
| ^~~~~~~~~~~~~~~~~
/usr/lib64/gcc/x86_64-suse-linux/10/include/cpuid.h:300:1: note: previous
definition of ‘__get_cpuid_count’ was here
300 | __get_cpuid_count (unsigned int __leaf, unsigned int __subleaf,
| ^~~~~~~~~~~~~~~~~
More information about the Gcc-bugs
mailing list