Type convert

complier is error ,following is program

#include <reg52.h>
#include <stdio.h>

unsigned int i;
sbit Test=P1^0;

main()
{
i=(int *)Test;
}

error info is :
error c253:INTERNAL ERROR(ASMGEN - TRIPLE=00D[00A5A202])

Parents
  • Setting aside the question what that compiler error message means: your code is at least as wrong as the compiler's reaction to it.

    This program cannot possibly do anything sensible: what on earth should the re-interpretation of a single *bit* as a pointer be?

    Patient: Doctor, it hurts if I do this (does it)!
    Doctor: Well, don't do that then.

Reply
  • Setting aside the question what that compiler error message means: your code is at least as wrong as the compiler's reaction to it.

    This program cannot possibly do anything sensible: what on earth should the re-interpretation of a single *bit* as a pointer be?

    Patient: Doctor, it hurts if I do this (does it)!
    Doctor: Well, don't do that then.

Children
No data
More questions in this forum