C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: C99 probelms

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards
View previous topic :: View next topic  
Author Message
Ivan A. Kosarev
Guest





PostPosted: Wed May 11, 2005 9:00 pm    Post subject: Re: C99 probelms Reply with quote




"Antoine Leca" <root (AT) localhost (DOT) invalid> wrote

Quote:
En <news:3dthbgF4aunU1 (AT) individual (DOT) net>, Ivan A. Kosarev va escriure:

The \ character sequence should be recognized as a backslash
sequence that is not introducing a UCN in the pp-string-literal

That was my point exactly.

(The other point about ? has to do with trigraphs, and how to escape
them;
I believe it would be valid too. YMMV.)

and thus should be ignored (that is, skipped) quietly and entirely.

I do not understand you. At any rate, in "sys\udefault.h", the should
certainly not be ignored (which would result in "sysdefault.h", a very
different thing). I should be rather be considered, but as a single ,
occuring between s and u.

Note that the definition for the pp-string-literal and pp-character-constant
grammar entities is for tokenization only. The definition just generalizes
all (double-)quoted entities that could be encountered during tokenization
so there will no need to avoid non-existing escape sequences with
string-literals, s-char-sequences and q-char-sequences when getting them
used in preprocessor directives and _Prgama operators. Neither of the
defined pp entities has semantics (just like pp-numbers) unless they are
converted to string literals, character-constant and other entitites. To
which one each instance of the pp entities should be converted depends on a
context the instance is used in.

Quote:
Inventing a new class of (different) escape sequences is not likely
to be appreciated by the users.

Right, it would make no sence to introduce an alternative set of
escape sequences.

Which is precisely what motivated the current words in the first place.

On Unix, is expected to announce an escape sequence, always. Thta is,
nobody will expect anything else to occur, nor would be surprised if a
is
grouped with the following character(s) to form an escape sequence.

OTOH, the long-standing tradition on MS-DOS and its heirs, is to have
things like
#include "systypes.h"
to work the same as the more natural
#include "sys/types.h"
(and certainly not to protest about a missing "sys ypes.h" file).
So the committee chose, long ago, to allow both behaviours: the present
redaction reflects this choice. Also, this means that using in a header
names cannot be made portable between Unix and MS-DOS (two heavyweight
contenders), so it is certainly not strictly conforming.

Note is that different meanings are possible for different contexts with the
pp entities.

For example, if we know that there are no t escape sequences in the
q-char-sequence, we can remain the character sequence as it is. What is
really important in the proposal is that any backslash sequence, matching or
not matching to an extisting escape sequence, will cause neither undefined
behaviour nor diagnostics until a pp-string-literal incorporating the
sequence is converted to a corresponding non-pp grammar entinty.

Another important note is that the proposal does not change specified
behaviour, and thus shouldn't break a lot of existing code.

--
Unicals Group -- Development Tools for OEMs
http://www.unicals.com


---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.