This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: What does "profil" means in C++
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Patrick Begou <Patrick dot Begou at legi dot grenoble-inp dot fr>, gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 14 Mar 2016 10:45:46 +0000
- Subject: Re: What does "profil" means in C++
- Authentication-results: sourceware.org; auth=none
- References: <56E19C15 dot 1040703 at legi dot grenoble-inp dot fr> <56E19DB6 dot 7070204 at redhat dot com> <56E1AB76 dot 2020406 at legi dot grenoble-inp dot fr> <56E1ABE1 dot 4020408 at redhat dot com>
On 10 March 2016 at 17:16, Andrew Haley wrote:
> On 10/03/16 17:14, Patrick Begou wrote:
>> Andrew Haley wrote:
>>> On 10/03/16 16:08, Patrick Begou wrote:
>>>> If I replace "profil" by "profile" as the class name it works on all compilers.
>>> "g++ -E -Wp,-dD" is your friend.
>>
>> so profil is a function declared in /usr/include/unistd.h and it collapse with
>> my type.
>> But this do not occur with all compilers...
>
> It's a bug in that old version of GCC, I think. unistd.h should not
> pollute your namespace like that.
Rather than trying to change the contents of <unistd.h> we modified
the libstdc++ headers to avoid including <unistd.h>, as documented at
https://gcc.gnu.org/gcc-4.7/changes.html