From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30789 invoked by alias); 7 Jul 2005 11:35:52 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 30759 invoked by uid 22791); 7 Jul 2005 11:35:50 -0000 Received: from exprod6og1.obsmtp.com (HELO psmtp.com) (64.18.1.121) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Thu, 07 Jul 2005 11:35:50 +0000 Received: from source ([192.150.11.134]) by exprod6ob1.obsmtp.com ([64.18.5.12]) with SMTP; Thu, 07 Jul 2005 04:35:47 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id j67BTCBM024081 for ; Thu, 7 Jul 2005 04:29:13 -0700 (PDT) Received: from iplan-mn (iplan-mn.corp.adobe.com [10.32.16.20]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id j67BZkn4022864 for ; Thu, 7 Jul 2005 04:35:47 -0700 (PDT) Received: from iplan-mn (localhost [127.0.0.1]) by iplan-mn.corp.adobe.com (iPlanet Messaging Server 5.2 HotFix 2.02 (built Oct 21 2004)) with ESMTP id <0IJ900KPX9JLHU@iplan-mn.corp.adobe.com> for gcc-help@gcc.gnu.org; Thu, 07 Jul 2005 06:35:45 -0500 (CDT) Received: from mn-eljay-a51m.adobe.com (mn-dhcp-17-28.corp.adobe.com [10.32.17.28]) by iplan-mn.corp.adobe.com (iPlanet Messaging Server 5.2 HotFix 2.02 (built Oct 21 2004)) with ESMTP id <0IJ900J749JKVJ@iplan-mn.corp.adobe.com> for gcc-help@gcc.gnu.org; Thu, 07 Jul 2005 06:35:45 -0500 (CDT) Date: Thu, 07 Jul 2005 11:35:00 -0000 From: Eljay Love-Jensen Subject: Re: What is the purpose of 'warning: no newline at end of file'? In-reply-to: To: Neo Anderson , gcc-help@gcc.gnu.org Message-id: <6.2.1.2.2.20050707063459.0287d5a0@iplan-mn.corp.adobe.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT References: <42CCA460.8070009@kangaroologic.com> X-SW-Source: 2005-07/txt/msg00071.txt.bz2 Hi Neo, --- Foo.h --- #ifndef Foo_H_ONCE #define Foo_H_ONCE extern int MyFoo; #endif // Foo_H_ONCE --- --- --- The "" is a meta to indicate that there is no newline at the end of the file. --- Foo.cpp --- #include "Foo.h" #include "Bar.h" ...yada yada yada... --- --- --- Is Bar.h supposed to be included? Or is the comment-to-end-of-line at the end of Foo.h supposed to comment it out? The behavior is undefined. HTH, --Eljay