This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: kerne-2.4.0-test13pre3 with gcc-2.97


From: Alexandre Oliva <aoliva@redhat.com>
To: Kaoru Fukui <k_fukui@highway.ne.jp>
Subject: Re: kerne-2.4.0-test13pre3 with gcc-2.97
Date: 24 Dec 2000 01:29:32 -0200
Cc: <linuxppc-dev@lists.linuxppc.org>, <gcc@gcc.gnu.org>

> 
> On Dec 23, 2000, Kaoru Fukui <k_fukui@highway.ne.jp> wrote:
> 
> > -		unsigned char b[0];
> > +		unsigned char *b;
> 
> This change (and apparently all other changes you've made) are
> definitely wrong.  Zero-sized arrays as the last element of a
> structure used to be an extension in GCC 2.95.2, that has been adopted
> by C99 with a slightly different syntax, that GCC CVS supports: just
> remove the `0' from between the braces.
> 
> With your change, you're changing what is supposed to be a structure
> whose last element is a flexible array with a structure that ends with
> a pointer to such an array, which means the array should be allocated
> separately, and any access to it must de-reference an additional
> pointer.  You'd have to adjust all uses of such a pointer to make this
> change.  Could this be the reason why your modified kernel doesn't
> work?

Thanks Alex your explain.

I tried this 

 -		unsigned char b[0];
 +		unsigned char b[];

It gave me Inetrnal  error: Segmentaion fault .

I had success compileing for the kernel with my patch.

I don't understand how do I do untill.

Thanks
Kaoru









Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]