diff options
Diffstat (limited to 'examples/gfcc/compiler/abs.c')
| -rw-r--r-- | examples/gfcc/compiler/abs.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/gfcc/compiler/abs.c b/examples/gfcc/compiler/abs.c index c93b703b6..90312a2de 100644 --- a/examples/gfcc/compiler/abs.c +++ b/examples/gfcc/compiler/abs.c @@ -1,12 +1,20 @@ int abs (int x){ + int y ; + { if (x < 0){ - return 0 - x ; + y = 0 - x ; } - else return x ; + else { + y = x ; + } + } + return y ; } ; int main () { int i ; i = abs (16); + printf (int,i) ; + return ; } ; |
