note generating in case of type confliction
Hello, I'm mostly new to gcc, so I don't really have a real idea how notes are generated. More exactly I would like to know, how types are compared during compilation, and what makes the compiler decide to throw a message in case they aren't equal. There is this message "note: expected `type` but argument is type of `type`". Now I'm searching the gcc-4.4.5 source library for that particular message, in hopes of getting a direction towards what i causes this message to appear. But I'm lost now, and need some help - a direction or a hint, where to lookup (source,headers,binaries) , would be very appreciated. Many thanks! Alex
Re: note generating in case of type confliction
Yes, you're right. The actual message is "expected %qT but argument is of type %qT" (found in c- typeck.c line: 4039), where tree-types are compared (tree type with tree rhstype). Sorry for the mistake and thank you. Von: Jonathan Wakely An: Klin Iop CC: "gcc@gcc.gnu.org" Gesendet: 20:00 Donnerstag, 18.Juli 2013 Betreff: Re: note generating in case of type confliction On 18 July 2013 20:32, Klin Iop wrote: > Hello, > > I'm mostly new to gcc, so I don't really have a real idea how notes are > generated. More exactly I would like to know, how types are compared during > compilation, and what makes the compiler decide to throw a message in case > they aren't equal. There is this message "note: expected `type` but argument > is type of `type`". Are you sure that's what it says? In the current sources search for "but argument" in gcc/c-family/c-format.c, in the GCC 4.4 sources search in gcc/c-typeck.c