|
From: | Timo |
Subject: | Re: [Tinycc-devel] Addresses of variables |
Date: | Sun, 11 Apr 2010 17:51:27 +0300 |
User-agent: | Thunderbird 2.0.0.24 (X11/20100317) |
Alexei wrote:
Isn't it a BUG? #include <stdio.h> int main(int argc, char **argv) { int first; int second; printf("&first=%08X &second=%08X",&first,&second); return 0; } --------------------------------- &first=0012FF94 &second=0012FF90
What exactly do you think is a bug? If you think, that it is a bug to allocate variable 'first' in a higher address than the variable 'second', you are wrong. Compiler is free to allocate variables as it wishes. Actually it would have been free *not* to allocate them at all if you didn't take the addresses of them.
-- Timo
[Prev in Thread] | Current Thread | [Next in Thread] |