"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
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.3001176/D=groups/S=:HM/A=2434971/rand=464623213


Yahoo! Groups Links

Reply via email to