This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: error: "no newline at end of file"


On 27 March 2007 16:07, Ian Lance Taylor wrote:

> Gabriel Dos Reis <gdr@cs.tamu.edu> writes:
> 
>> Martin Michlmayr <tbm@cyrius.com> writes:
>> 
>>> * Manuel LÃpez-IbÃÃez <lopezibanez@gmail.com> [2007-03-27 13:13]:
>>>> So if you are seeing this in C++, the change was intentional because
>>>> PR24924 was fixed. If you are seeing it in C and you are not using
>>>> pedantic-errors, then it is probably a bug.
>>> 
>>> Thanks for the explanation - this explains what I'm seeing.  Is there
>>> a good reason against changing this particular warning from
>>> CPP_DL_PEDWARN to CPP_DL_WARNING?  Quite a few packages in Debian fail
>>> to build because of this and it seems overly strict to me.  However, if
>>> it'll remain an error with C++ code, I'll start filing bugs on these
>>> packages.
>> 
>> -pedantic asks for strict checking of rules.  User should accept
>> correcting their codes (or used codes) with they ask for strict checking.
> 
> I agree, but what is happening now is that "no newline at end of file"
> is an error even when -pedantic is not specified.  I don't think that
> is acceptable.
> 
> Ian

  I just stumbled across enhancement request PR14331, which is for this same feature.  I think I should update my old patch and submit it.

  I could use a little advice about the best way to add a new preprocessor option flag setting; my original patch crudely adds a new global warning flag and then copies it into a member in the cpp options struct during c_common_post_options, which I think is probably not "The Right Thing To Do"(TM), and I haven't even studied the 4.x options-handling mechanisms yet, but what Manuel wrote in that PR implies that they have changed a bit since 3.3.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]