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...


kamaraju kusumanchi wrote:
> On Tue, Nov 11, 2008 at 5:20 AM, Andrew Haley <aph@redhat.com> wrote:
>> kamaraju kusumanchi wrote:
>>>>> This did not make any difference. The compilation stops at the same location.
>>>>>
>>>>> This time I unpacked the source in ~/software/unZipped/gcc-4.3.2 . I
>>>>> tried to compile in ~/software/compileHere/gcc-4.3.2. I am attaching
>>>>> the new configure.log, make.log .
>>>>>
>>>>> Any other suggestions?
>>>> I think might be one I fixed.
>>>> See
>>>>
>>>> http://gcc.gnu.org/ml/gcc-patches/2008-06/msg00687.html
>>>> http://gcc.gnu.org/ml/gcc-patches/2008-06/msg00858.html
>>> Ok. It looks like the patch has not been backported to gcc 4.3.2 . I
>>> will wait for the next release 4.3.3 or 4.4) then.
>> As you like.  It would be interesting to know if it fixes your problem;
>> I can't test it.
>>
> 
> In that case, I thought it would be wiser to test it right away with
> the snapshots. That way when 4.4 is released, I can be sure that it
> will work on this machine!
> 
> I tried to compile the latest weekly snapshot  (20081107) . It seemed
> to overcome the original problem. But still I am not able to compile
> gcc-4.4-20081107. The new errrors are
> 
> cc -c  -g -DIN_GCC    -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/builtins.c -o builtins.o
> "../../../unZipped/gcc-4.4-20081107/gcc/builtins.c", line 7623:
> operands have incompatible types:
>          struct real_value {unsigned int cl :2, unsigned int decimal
> :1, unsigned int sign :1, unsigned int signalling :1, unsigned int
> canonical :1, unsigned int uexp :26, array[5] of unsigned long sig}
> ":" const struct real_value {unsigned int cl :2, unsigned int decimal
> :1, unsigned int sign :1, unsigned int signalling :1, unsigned int
> canonical :1, unsigned int uexp :26, array[5] of unsigned long sig}
> cc: acomp failed for ../../../unZipped/gcc-4.4-20081107/gcc/builtins.c
> make[3]: *** [builtins.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
> 
> 
> The source was configured with
> nohup ../../unZipped/gcc-4.4-20081107/configure
> --prefix=/home/kkusuman/software/myroot/gcc-4.4-20081107 2>&1 >
> configure.log &
> 
> The configured source is compiled with
> nohup make 2>&1 > make.log &
> 
> The latest configure.log, make.log are attached for reference...

Wow, that is one picky compiler.  It's complaining that in the conditional
expression

	    BUILTIN_SQRT_P (fcode) ? dconsthalf : dconst_third ();

the lhs of the : is struct real_value, the rhs is const struct real_value.
I think that it's right to complain: the standard says that they must have
the same structure type, not just that the types are compatible.  This is
slightly absurd, but it is the letter of the standard.

Please try this.  If it works I'll push it to mainline.

Andrew.


Index: builtins.c
===================================================================
--- builtins.c	(revision 141575)
+++ builtins.c	(working copy)
@@ -7619,8 +7619,11 @@
 	  tree arg0 = CALL_EXPR_ARG (arg, 0);
 	  tree tree_root;
 	  /* The inner root was either sqrt or cbrt.  */
-	  REAL_VALUE_TYPE dconstroot =
-	    BUILTIN_SQRT_P (fcode) ? dconsthalf : dconst_third ();
+	  REAL_VALUE_TYPE dconstroot;
+	  if (BUILTIN_SQRT_P (fcode))
+	    dconstroot = dconsthalf;
+	  else
+	    dconstroot = dconst_third ();

 	  /* Adjust for the outer root.  */
 	  SET_REAL_EXP (&dconstroot, REAL_EXP (&dconstroot) - 1);


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