public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Rupert Wood" <me@rupey.net>
To: "'Lev Assinovsky'" <LAssinovsky@algorithm.aelita.com>
Cc: "'Eljay Love-Jensen'" <eljay@adobe.com>,
	"'Gcc-Help \(E-mail\)'" <gcc-help@gcc.gnu.org>
Subject: RE: How to suppress warning?
Date: Fri, 24 Oct 2003 10:18:00 -0000	[thread overview]
Message-ID: <E1ACz1f-0004yh-0V@anchor-post-31.mail.demon.net> (raw)
In-Reply-To: <5.2.1.1.0.20031023122718.00ba1dc0@iplan-mn.corp.adobe.com>

Eljay / Lev wrote: 

> > Sorry, but we have tons of files in SourceSafe. To do what you
> > suggest I have to stop our company for few hours, which is
> > impossible.

Then work early, work late or work a weekend :-) But I don't think it's
worth fixing: they'd slowly rot away since Windows editors don't care about
EOFs at the end of the file.

If you can convince everyone to working with 'view whitespace', though, ...
:-)

> >So there is no option like "-Wno-noendofline" ?
> Not to my knowledge.

I don't think there's a unix sourcesafe client, is there? (I guess
SourceOffSite may have one, I've never seen it.) That means you have to
check out on Windows and then copy over to unix? When I used to work with
unix and sourcesafe I wrote a few scripts to include line ending conversion
and the newline at end of file conversion at the same time as the copy. If
you edit on unix and copy back, you get the newline-at-end-of-file and any
stray LFs in sourcesafe fixed up for you; yeah, it's an unnecssary diff but
it's not a great deal as these things go.

As Eljay suggests you can strip the warning with unix tools. You could do
this on the compile line (I'm not sure I have the magic shell knowledge,
though; someething like:

    gcc foo.c 2|grep -v "no newline"

? I've never piped stderr before) or edit that into the compile rules in
your makefile  - but this means you can't use -Werror and maybe -pedantic
too. But if you're just inspecting a build log afterwards it's quite easy,
e.g.

    gmake &> build.log
    grep -v "no newline" <build.log >build2.log

Or, if you're comfortable building your own GCC it'd be easy enough to stop
the warning there. Look in gcc/cpplex.c. There's no flag test where the
warning's generated so you're right, there's no flag already to suppress
this. You could, of course, add one and submit a patch - shouldn't be too
hard :-)

Good luck,
Rup.

  reply	other threads:[~2003-10-24 10:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-23 16:19 Lev Assinovsky
2003-10-23 17:30 ` Eljay Love-Jensen
2003-10-24 10:18   ` Rupert Wood [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-23 15:28 lrtaylor
2003-10-24 10:18 ` Rupert Wood
2003-10-23 15:26 Lev Assinovsky
2003-10-23 15:58 ` Eljay Love-Jensen
2003-10-23 14:32 Lev Assinovsky
2003-10-23 15:19 ` Eljay Love-Jensen
2003-10-23 13:26 Lev Assinovsky
2003-10-23 13:40 ` Eljay Love-Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1ACz1f-0004yh-0V@anchor-post-31.mail.demon.net \
    --to=me@rupey.net \
    --cc=LAssinovsky@algorithm.aelita.com \
    --cc=eljay@adobe.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).