From: "Rupert Wood" <me@rupey.net>
To: <kabir.patel@uk.andersen.com>
Cc: <gcc-help@gcc.gnu.org>
Subject: Re: warning: unknown escape sequence '\)'
Date: Tue, 05 Feb 2002 03:25:00 -0000 [thread overview]
Message-ID: <616BE6A276E3714788D2AC35C40CD18D03AA1C@whale.softwire.co.uk> (raw)
In-Reply-To: <616BE6A276E3714788D2AC35C40CD18D394BDC@whale.softwire.co.uk>
Kabir Patel wrote:
> warning: unknown escape sequence '\)'
Backslash is used as an escaping character for C strings; if you'd like
to include a character that you wouldn't normally be able to represent
in a text file then you can use an escape code for it, for example:
\t tab (ASCII 9)
\n newline (ASCII 10)
\r carriage return (ASCII 13)
\001 character with octal value 001
\xAB character with hexadecimal value AB
but since backslash has been overloaded, an escape is necessary to
actually embed a backslash:
\\ backslash
Now there is no '\)' escape defined in C; however, ')' can be escaped in
sed/perl/etc. regular expressions to change its meaning. By default (I
think), an unrecognised escape code will just emit the escaped character
without the escaping backslash, i.e. this will be treated as ')' here.
> a) What "\)\n" means?
Presumably it means a short string: right close bracket, end of line (+
string terminating nul).
> b) Why it isn't compiling now?
It is. That was just a warning; unless you've also specified -Werror
(treat warnings as errors) then this won't stop compilation.
> b) If it can be validly replaced?
Yes, ")\n" is probably correct.
Rup.
next parent reply other threads:[~2002-02-05 11:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <616BE6A276E3714788D2AC35C40CD18D394BDC@whale.softwire.co.uk>
2002-02-05 3:25 ` Rupert Wood [this message]
2002-02-05 3:07 kabir.patel
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=616BE6A276E3714788D2AC35C40CD18D03AA1C@whale.softwire.co.uk \
--to=me@rupey.net \
--cc=gcc-help@gcc.gnu.org \
--cc=kabir.patel@uk.andersen.com \
/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).