This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: major and minor macros in /usr/include/x86_64-linux-gnu/sys/sysmacros.h
- From: Ian Lance Taylor <iant at google dot com>
- To: Pedro Larroy <pedro dot larroy dot lists at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 04 Jan 2012 17:51:45 -0800
- Subject: Re: major and minor macros in /usr/include/x86_64-linux-gnu/sys/sysmacros.h
- References: <CAC_CU1i9Dr4_SVO4xgGaa4YE79kVQ3LJTeP1Hf1FU69_caMmPA@mail.gmail.com>
Pedro Larroy <pedro.larroy.lists@gmail.com> writes:
> Shouldn't major and minor macros in
> /usr/include/x86_64-linux-gnu/sys/sysmacros.h be inline functions?
> They prevent doing stuff like
>
> struct T {
> T() : major() {}
> int major;
> };
>
> in C++. According to the C++ standard those names shoudn't be
> reserved to the implementation, and thus be available.
This question is not appropriate for the mailing list gcc@gcc.gnu.org,
which is for the development of gcc itself. It would be appropriate for
the mailing list gcc-help@gcc.gnu.org. Please take any followups to
gcc-help. Thanks.
This is what gcc refers to as a fixed header. It is a copy of a system
header file which minor edits applied. The real file is (probably)
/usr/include/sys/sysmacros.h. If you look there, you will (probably)
see that major and minor are defined there. That is an issue to be
addressed by whatever package suplied sysmacros.h. It is not gcc.
Ian