![]() |
| | #1 |
| Registered User Join Date: Nov 2009
Posts: 1
| "How do we get to know whether variable stored in register or not, programmatically ?" Please give me any idea, If anyone already done this one. Thanks in Advance Srikanth Dhondi Last edited by dhondi; 11-03-2009 at 12:29 PM. |
| dhondi is offline | |
| | #2 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,768
| You don't have any way of knowing that. What does "programmatically" mean in this context?
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot |
| brewbuck is offline | |
| | #3 |
| Registered User Join Date: Jan 2009
Posts: 224
| There is a storage class specifier called register, but as far as I know that only works as a suggestion for the compiler, ie it may not be stored in a register anyway. |
| Subsonics is offline | |
| | #4 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,785
| The only way of knowing it is looking at the assembly of the compiled code. It is impossible to do programatically, if it means finding out so via code. Remember that C knows nothing about the process architecture or its registers. It is simply a high-level language that is translated into instructions for the cpu.
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
![]() |
| Tags |
| stored in register, variable |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| static class variable vs. global variable | nadamson6 | C++ Programming | 18 | 09-30-2005 03:31 PM |
| variable being reset | FoodDude | C++ Programming | 1 | 09-15-2005 12:30 PM |
| pointers | InvariantLoop | C Programming | 13 | 02-04-2005 09:32 AM |
| Problem with a char variable set as a letter | 7smurfs | C++ Programming | 6 | 12-10-2004 01:25 PM |
| creating class, and linking files | JCK | C++ Programming | 12 | 12-08-2002 02:45 PM |