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: warning: no newline at end of file


"Dave Korn" <dk@artimi.com> writes:
>   ... Or you could always apply this patch (generated against release 3.3.3,
> so may need a little fuzz to fit into whatever version you're using), and
> then use the flag -Wno-eof-newline to disable the warning....
>
> [  Note that this patch isn't a submission because I'm fairly sure I'm not
> using the correct option-parsing mechanism; I'm sure I should be adding a
> case to the switch statement in xxxxx, rather than manually copying a global
> in c_common_post_options.  Oh, and I didn't update the docs either.  Both
> these things would need doing properly in a real patch.  However, it does
> the job in a QUAD fashion.  ]

You want to be editing c.opt, which will give you a new OPT_thingy
enumerator that you can add to the switch statement in c-opts.c.  The
code for that switch clause should set the flag in the cpplib options
structure directly (several other such clauses do this already); then
you needn't introduce a new global.

I am of the opinion that, since we don't have a generic fine-grained
warning control mechanism (yet), all user requests for new -W switches
should be honored.  Therefore, I'm agreed with your patch in principle.

zw


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