"codealot_sir" <[EMAIL PROTECTED]> wrote:
>
> So, I know that the compiler totally ignores comments,
A compiler doesn't have to. Some systems allow meta comments to
affect code.
> but just to be sure, do all of the following get translated into
> machine language?
There are generally no hard and fast answers to that. It depends on
the compiler, the platform, the targent system, the level of
optimisation, the assembler (if any), language extensions, etc..
etc...
Please try and provide your own answers, even if you think they are
wildly wrong.
> - compiler directives
> - using namespace statement
The using directive itself is an aide for identifier scopes.
Generally, it's highly unlikely to affect the produced code anymore
than changing identifier names will affect the machine code produced.
> - variable declarations
If they have initialisors or implicit constructors, yes. On the other
hand, even those declarations may be optimised out.
> - executable statements
If these weren't compiled, compilers wouldn't be very useful, would
they?
But a compiler need not produce precisely matched code for each
statement. Compilers are free to make optimisations so long as they
preserve the semantics (meaning) of the original source code.
--
Peter
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
