我正在處理計算機體系結構課程的SIM。我嘗試使用gcc v4.5.2編譯與MSYS1.1/MinGW的軟件包。嵌套結構定義
Makelog:
In file included from
sim-outorder.c:107:0: bpred.h:214:5:
error: expected specifier-qualifier-list before 'uint'
...
make: *** [sim-outorder.o] Error 1
我查bpred.h線214,有一個嵌套的結構定義爲:
208 /* branch predictor update information */
209 struct bpred_update {
210 char *pdir1; /* direction-1 predictor counter */
211 char *pdir2; /* direction-2 predictor counter */
212 char *pmeta; /* meta predictor counter */
213 struct dir{ /* predicted directions */
214 uint bimod : 1; /* bimodal predictor */
215 uint twolev : 1; /* 2-level predictor */
216 uint meta : 1; /* meta predictor (0..bimod/1..2lev) */
217 } dir;
218 };
有什麼不對這個結構塊? 你能幫忙嗎? 謝謝!
uint定義在哪裏? – 2011-05-03 20:46:50
struct unsigned int uint;補充說,案件得到解決。謝謝!! – 2011-05-05 19:57:57