I'm having a hard time tying to build gcc 4.3.1 on Solaris using the GNU
compilers. I then decided to try to use Sun's compiler. The Sun Studio
12 compiler reports the following code, which is in the source
(gcc-4.3.1/gcc/c-common.c) of gcc 4.3.1, is a syntax error.
I'm inclined to agree, as it is like no C I have ever met.
what is "C_COMMON_FIXED _TYPES (, fract);" supposed to mean? Could it be
written in a different way so the Sun compiler could understand it? Or
are Sun at fault?
I'd certainly never write C code like this, but perhaps it is legal.
#define C_COMMON_FIXED_ MODE_TYPES(SAT, NAME) \
if (type1 == SAT ## NAME ## _type_node \
|| type1 == SAT ## u ## NAME ## _type_node) \
return unsignedp ? SAT ## u ## NAME ## _type_node \
: SAT ## NAME ## _type_node;
C_COMMON_FIXED_ TYPES (, fract); /* line 2254 */
C_COMMON_FIXED_ TYPES (sat_, fract);
C_COMMON_FIXED_ TYPES (, accum);
C_COMMON_FIXED_ TYPES (sat_, accum);
So is this really C, or is it just a GNU ism, which prevents the GNU C
compiler compiling with a compiler able to compiler C ?? I thought one
was supposed to need a C compiler to compile gcc, but perhaps I was
mistaken.
cc -c -g -DIN_GCC -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.3.1/gcc
-I../../gcc-4.3.1/gcc/. -I../../gcc-4.3.1/gcc/../include -I./../intl
-I../../gcc-4.3.1/gcc/../libcpp/include -I/usr/local/include
-I/usr/local/include -I/usr/local/include
-I../../gcc-4.3.1/gcc/../libdecnumber
-I../../gcc-4.3.1/gcc/../libdecnumber/dpd -I../libdecnumber
.../../gcc-4.3.1/gcc/c-common.c -o c-common.o
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token:
short_fract_typ e_no...
"../../gcc-4.3.1/gcc/c-common.c", line 2254: syntax error before or at: ||
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token:
unsigned_short_ frac...
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token:
unsigned_short_ frac...
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token:
short_fract_typ e_no...
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token: fract_type_node
compilers. I then decided to try to use Sun's compiler. The Sun Studio
12 compiler reports the following code, which is in the source
(gcc-4.3.1/gcc/c-common.c) of gcc 4.3.1, is a syntax error.
I'm inclined to agree, as it is like no C I have ever met.
what is "C_COMMON_FIXED _TYPES (, fract);" supposed to mean? Could it be
written in a different way so the Sun compiler could understand it? Or
are Sun at fault?
I'd certainly never write C code like this, but perhaps it is legal.
#define C_COMMON_FIXED_ MODE_TYPES(SAT, NAME) \
if (type1 == SAT ## NAME ## _type_node \
|| type1 == SAT ## u ## NAME ## _type_node) \
return unsignedp ? SAT ## u ## NAME ## _type_node \
: SAT ## NAME ## _type_node;
C_COMMON_FIXED_ TYPES (, fract); /* line 2254 */
C_COMMON_FIXED_ TYPES (sat_, fract);
C_COMMON_FIXED_ TYPES (, accum);
C_COMMON_FIXED_ TYPES (sat_, accum);
So is this really C, or is it just a GNU ism, which prevents the GNU C
compiler compiling with a compiler able to compiler C ?? I thought one
was supposed to need a C compiler to compile gcc, but perhaps I was
mistaken.
cc -c -g -DIN_GCC -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.3.1/gcc
-I../../gcc-4.3.1/gcc/. -I../../gcc-4.3.1/gcc/../include -I./../intl
-I../../gcc-4.3.1/gcc/../libcpp/include -I/usr/local/include
-I/usr/local/include -I/usr/local/include
-I../../gcc-4.3.1/gcc/../libdecnumber
-I../../gcc-4.3.1/gcc/../libdecnumber/dpd -I../libdecnumber
.../../gcc-4.3.1/gcc/c-common.c -o c-common.o
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token:
short_fract_typ e_no...
"../../gcc-4.3.1/gcc/c-common.c", line 2254: syntax error before or at: ||
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token:
unsigned_short_ frac...
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token:
unsigned_short_ frac...
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token:
short_fract_typ e_no...
"../../gcc-4.3.1/gcc/c-common.c", line 2254: invalid token: fract_type_node
Comment