• Pages

  • Poll

    Who are you ?

    View Results

    Loading ... Loading ...
  • Recent Posts

  • Recent Comments

  • Archives

  • Fri 13 Apr 2007

    GCC – No newline at end of file

    Published at 15:09   Category C++  

    Just a small post to understand why GCC complains that there is “No newline at end of file” :

    > What is the rationale for this warning ? What can break or is it a
    > standards thing ?
    
    Imagine foo.h:
    
    blah blah blah
    
    Now bar.c:
    
    #include "foo.h"
    #include "grill.h"
    
    Now imagine a preprocessor that isn't smart enough to put
    the newline in for you...
    
    blah blah blah#include "grill.h"
    
    It may not include grill.h.

    That’s obvious but I never thought about it =)

    No Comments »

    No comments yet.

    RSS feed for comments on this post. TrackBack URI

    Leave a comment

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



    Notify me of follow-up comments via email.