Menu

About GCC and commented lines

2002-11-29
2012-09-26
  • Nobody/Anonymous

    Does GCC excludes the commented lines from the exe code generation automatically? Or theres a flag for it?

     
    • Nobody/Anonymous

      I think it auto does it

       
    • Nobody/Anonymous

      You mean as:   /* something here */   or   // something here commented lines ?. If yes...  the anwser is yes.

      j@ck_

       
      • Nobody/Anonymous

        Sorry, the rest of the above post...
        the anwser is yes:: It is 'auto'  the compiler does not see them.

        j@ck_

         
    • Nobody/Anonymous

      Interesting question. Why would you believe that gcc would not do such a thing?

      Well, I decided to do a little experiment, just to confirm what I thought I knew.  I took some code I had lying around, and put a bunch of comments in, compiled and rechecked the size of the exe.

      The answer - the exe did not change by one byte.

      Wayne

       
    • Nobody/Anonymous

      From hexediting / disassenbling some exes i was able to find a comment on a file, it was surrounded by /* */. The thing is that i can tell which language was used in that exe, wich compiler,  etc.

      So my question was if that would be a problem for us gcc users :)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.