This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: "../.././gcc/c-common.c", line 2259: invalid token: short_fract_type_no...


On Tue, Nov 11, 2008 at 2:27 PM, kamaraju kusumanchi
<raju.mailinglists@gmail.com> wrote:
>>
>> The patch worked. But I think there are more instances of the same problem.
>>
>> "../../../unZipped/gcc-4.4-20081107/gcc/fixed-value.c", line 294:
>> operands have incompatible types:
>>         struct  {unsigned long long low, long long high} ":" const
>> struct  {unsigned long long low, long long high}
>> cc: acomp failed for ../../../unZipped/gcc-4.4-20081107/gcc/fixed-value.c
>> make[3]: *** [fixed-value.o] Error 2
>> make[3]: Leaving directory
>> `/home/kkusuman/software/compileHere/gcc-4.4-20081107/gcc'
>> make[2]: *** [all-stage1-gcc] Error 2
>> make[2]: Leaving directory
>> `/home/kkusuman/software/compileHere/gcc-4.4-20081107'
>> make[1]: *** [stage1-bubble] Error 2
>> make[1]: Leaving directory
>> `/home/kkusuman/software/compileHere/gcc-4.4-20081107'
>> make: *** [all] Error 2
>>
>
> I made a patch for this problem
>
>> cat patch2.txt
> --- fixed-value.c.orig  2008-11-11 13:45:30.655438000 -0500
> +++ fixed-value.c       2008-11-11 13:51:08.102757000 -0500
> @@ -291,7 +291,13 @@ do_fixed_add (FIXED_VALUE_TYPE *f, const
>              const FIXED_VALUE_TYPE *b, bool subtract_p, bool sat_p)
>  {
>   bool overflow_p = false;
> -  double_int temp = subtract_p ? double_int_neg (b->data) : b->data;
> +
> +  double_int temp;
> +  if (subtract_p)
> +    temp = double_int_neg (b->data);
> +  else
> +    temp =  b->data;
> +
>   bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode);
>   int i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode);
>   f->mode = a->mode;
>
> Please check it and push it to the main line.
>

I am bitten by this issue again. After applying the patch, the stage 1
completes successfully. However in the stage 2, I get the following
error

../../../unZipped/gcc-4.4-20081107/gcc/../libdecnumber
-I../../../unZipped/gcc-4.4-20081107/gcc/../libdecnumber/dpd
-I../libdecnumber   -I/home/kkusuman/software/myroot/include
../../../unZipped/gcc-4.4-20081107/gcc/final.c -o final.o
/home/kkusuman/software/compileHere/gcc-4.4-20081107/./prev-gcc/xgcc
-B/home/kkusuman/software/compileHere/gcc-4.4-20081107/./prev-gcc/
-B/home/kkusuman/software/myroot/gcc-4.4-20081107/sparc-sun-solaris2.8/bin/
-c  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat
-Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
-DHAVE_CONFIG_H -I. -I. -I../../../unZipped/gcc-4.4-20081107/gcc
-I../../../unZipped/gcc-4.4-20081107/gcc/.
-I../../../unZipped/gcc-4.4-20081107/gcc/../include -I./../intl
-I../../../unZipped/gcc-4.4-20081107/gcc/../libcpp/include
-I../../../unZipped/gcc-4.4-20081107/gcc/../libdecnumber
-I../../../unZipped/gcc-4.4-20081107/gcc/../libdecnumber/dpd
-I../libdecnumber   -I/home/kkusuman/software/myroot/include
../../../unZipped/gcc-4.4-20081107/gcc/fixed-value.c -o fixed-value.o
cc1: warnings being treated as errors
../../../unZipped/gcc-4.4-20081107/gcc/fixed-value.c: In function
'do_fixed_add':
../../../unZipped/gcc-4.4-20081107/gcc/fixed-value.c:301: error: ISO
C90 forbids mixed declarations and code
make[3]: *** [fixed-value.o] Error 1
make[3]: Leaving directory
`/home/kkusuman/software/compileHere/gcc-4.4-20081107/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory
`/home/kkusuman/software/compileHere/gcc-4.4-20081107'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory
`/home/kkusuman/software/compileHere/gcc-4.4-20081107'
make: *** [all] Error 2

Any ideas on how to overcome the problem?

raju


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