gtype-desc.c:8893:18: error: subscripted value ...

2482 단어 lfs
LFS 버전 7.1, gcc 컴파일 중
lfs:/mnt/lfs/sources/gcc-build/gcc$ gcc -c   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6.2/gcc -I../../gcc-4.6.2/gcc/. -I../../gcc-4.6.2/gcc/../include -I../../gcc-4.6.2/gcc/../libcpp/include -I/mnt/lfs/sources/gcc-build/./gmp -I/mnt/lfs/sources/gcc-4.6.2/gmp -I/mnt/lfs/sources/gcc-build/../gcc-4.6.2/mpfr/src -I/mnt/lfs/sources/gcc-4.6.2/mpc/src  -I../../gcc-4.6.2/gcc/../libdecnumber -I../../gcc-4.6.2/gcc/../libdecnumber/dpd -I../libdecnumber    gtype-desc.c -o gtype-desc.o
gtype-desc.c:8893:18: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9012:36: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9096:31: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9117:31: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9124:31: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9131:31: error: subscripted value is neither array nor pointer nor vector

해결 방법:
gccsource의 gcc/gengtype을 수정합니다.c (대략 3603줄) structpair newv를 if 밖으로 이동해서 해결:
수정:
static void
write_field_root (outf_p f, pair_p v, type_p type, const char *name,
                  int has_length, struct fileloc *line, const char *if_marked,
                  bool emit_pch, type_p field_type, const char *field_name)
{
  /* If the field reference is relative to V, rather than to some
     subcomponent of V, we can mark any subarrays with a single stride.
     We're effectively treating the field as a global variable in its
     own right.  */
      struct pair newv;
  if (v && type == v->type)
    {
      newv = *v;
      newv.type = field_type;
      newv.name = ACONCAT ((v->name, ".", field_name, NULL));
      v = &newv;
    }
  /* Otherwise, any arrays nested in the structure are too complex to
     handle.  */
  else if (field_type->kind == TYPE_ARRAY)
    v = NULL;
  write_root (f, v, field_type, ACONCAT ((name, ".", field_name, NULL)),
              has_length, line, if_marked, emit_pch);
}

Type the name of a command and press enter to execute it, or help for assistance.

좋은 웹페이지 즐겨찾기