This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Stream ODR types
- From: Richard Biener <rguenther at suse dot de>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Sep 2014 09:38:29 +0200 (CEST)
- Subject: Re: Stream ODR types
- Authentication-results: sourceware.org; auth=none
- References: <20140911070628 dot GA26027 at kam dot mff dot cuni dot cz> <5411D37D dot 3080904 at redhat dot com>
On Thu, 11 Sep 2014, Jason Merrill wrote:
> On 09/11/2014 03:06 AM, Jan Hubicka wrote:
> > http://kam.mff.cuni.cz/~hubicka/odr-warnings-firefox.txt
>
> > /aux/hubicka/firefox4/content/media/fmp4/ffmpeg/libav53/include/libavcodec/avcodec.h:997:0:
> > note: the first difference of corresponding definitions is field ‘data’
> > uint8_t *data[AV_NUM_DATA_POINTERS];
> > ^
> > /aux/hubicka/firefox4/content/media/fmp4/ffmpeg/libav54/include/libavcodec/avcodec.h:997:0:
> > note: a field of same name but different type is defined in another
> > translation unit
> > uint8_t *data[AV_NUM_DATA_POINTERS];
> > ^
> > /usr/include/stdint.h:49:24: note: type ‘uint8_t’ should match type
> > ‘uint8_t’
> > typedef unsigned char uint8_t;
> > ^
> > /usr/include/stdint.h:49:24: note: the incompatible type is defined here
>
> Hmm, how can uint8_t be incompatible with itself?
One reason I was suggesting of only handling record types and
arrays of records. For fundamental types we can very easily verify
compatibility.
Richard.