in Compiler Design
319 views
0 votes
0 votes
The programming language C does not have a boolean type. Show how a C compiler might translate an if-statement into three-address code.
in Compiler Design
by
319 views

1 Answer

0 votes
0 votes

eg- 

If (A < B)

        A=B;

 else

        B=A;

Three-address code-

........

1000:

1001: If (A < B) goto 1004

1002: B=A

1003: goto 1005

1004: A=B

1005:

1006:

.......

 

Related questions