pointer to incomplete class type error in polyspace.

조회 수: 2 (최근 30일)
PN
PN 2016년 11월 22일
답변: Alexandre De Barros 2016년 11월 22일
Hello,
I get polyspace compilation error as "pointer to incomplete class type is not allowed" in polyspace2010b version and gnu compiler.
below is the sample of code: struct student_s { unsigned int applicationId; };
typedef struct student_s student_t;
typedef student_t *studentid_t;
struct studentinfo_s { studentid_t id; };
typedef struct studentinfo_s studentinfo_t; studentinfo_t * const student_Info;
student_Info->id->applicationId = 10;
Polyspace throws error when I try to assign 10 to student_Info->id->applicationId. How can i fix this error.
Regards, PN.

채택된 답변

Alexandre De Barros
Alexandre De Barros 2016년 11월 22일
Hello,
I haven't been able to reproduce this error with the last version of Polyspace (R2016b).
Here is the complete code snippet used for the test:
struct student_s {
unsigned int applicationId;
};
typedef struct student_s student_t;
typedef student_t *studentid_t;
struct studentinfo_s { studentid_t id; };
typedef struct studentinfo_s studentinfo_t;
studentinfo_t * const student_Info;
studentinfo_t glob;
void f(void) {
student_Info = &glob;
student_Info->id->applicationId = 10;
}
I suggest you to try with this new version. If you cannot upgrade, please contact the support and attach the verification log to your request.
Regards,
Alexandre

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Troubleshooting in Polyspace Products for Ada에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by