0 0 votes float a =10 is not a semantic error but in the semantic phase int a =10.0 will be a semantic error or not bcz compiler cannot do explicit type conversion..so it must be an error...but when I am running this program this is showing no error... Compiler Design compiler-design + – samarpita 643 views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply anon1 commented Dec 10, 2021 reply Follow flag Assuming you have semicolon after every statement. Now, int a =10.0 it will be converted to int a =(int)10.0 by compiler which is know as implicit type conversion. 0 0 replyShare samarpita commented Dec 10, 2021 reply Follow flag But there will be loss of data..if i Consider.. int a=10.2;..by doing int a=(int)10.2; we are losing that .2 0 0 replyShare anon1 commented Dec 10, 2021 reply Follow flag Yes.And also sizeof int is smaller than size of float. Good programmer will take care of this. 0 0 replyShare samarpita commented Dec 10, 2021 reply Follow flag in semantic phase we do type checking by using the symbol and do type conversion any other work in semantic analyzer... Syntax analyzer we just check whether the tokens are syntactically correct or not...So here what's the use of symbol table? In lexical analyzer we convert the lexemes into tokens and adds information into symbol table 0 0 replyShare Please log in or register to add a comment.