주식회사 누리아이티

정보자산의 보안강화를 위한 3단계 인증 보안SW(BaroPAM) 전문기업인 누리아이티

▶ Tuxedo/오류 메시지(Tuxedo)

"test.c", line 3.5: 1506-009 (S) Bit-field test1 must be of type signe

누리아이티 2010. 8. 18. 10:48

현상 : "test.c", line 3.5: 1506-009 (S) Bit-field test1 must be of type signed int, unsigned int or int.
       "test.c", line 4.5: 1506-009 (S) Bit-field test2 must be of type signed int, unsigned int or int.
       "test.c", line 5.5: 1506-009 (S) Bit-field test3 must be of type signed int, unsigned int or int.
 

원인 : Solaris, HP/UX, Linux에서는 에러 메시지 없이 컴파일되는데 AIX에서 에러 메시지를 내보내며 xlc로 컴파일이 안 된다.
 

조치 : bit field를 char이 아닌 int로 바꾸면 컴파일이 된다.
       xlc 컴파일러로는 비트필드로 'unsigned char'를 사용할 수 없기 때문에 대신 'unsigned int'를 사용해야 한다. xlc는 ANSI가 아닌 extended mode 상태에서 'unsigned char'를 'unsigned int'로 자동으로 변환한다.