stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: [PATCH] RE: testsuite process helpers
Date Tue, 07 Nov 2006 16:34:26 GMT
Farid Zaripov wrote:
>>-----Original Message-----
>>From: Martin Sebor [mailto:sebor@roguewave.com] 
>>Sent: Thursday, November 02, 2006 12:12 AM
>>To: stdcxx-dev@incubator.apache.org
>>Subject: Re: [PATCH] RE: testsuite process helpers
>>
>>[...]
>>
>>>+        if ('\'' == *cmd || '\"' == *cmd) {
>>>+            char* const cmd1 = cmd + 1;
>>>+            // search the closing quote
>>>+            if (char* pos = strchr (cmd1, *cmd)) {
>>
>>Did we decide that it was okay to use this syntax the last 
>>time we discussed it ot or did we say we'd avoid it? (I don't 
>>recall and am too lazy to look it up.)
> 
>   Sorry, I didn't catch what the problem with syntax (I didn't found
> discussion about _rw_split_cmd() function).
> Could you be more specific?

The syntax I'm talking about is the one involving the declarator,
i.e., in the above the writing the if statement like this:

     if (char* pos = strchr (cmd1, *cmd))

rather than like this:

     char* pos = strchr (cmd1, *cmd);
     if (pos)

I thought we had discussed this but I might be thinking of the
for loop scoping discussion (starting http://tinyurl.com/y4xyph).
I'm pretty sure there are older compilers that don't support the
more concise form so I think we should continue to avoid relying
on it or decide that the syntax will be required in order to
support stdcxx. I don't think we ever came to a decision on the
for loop question either. I think it would make sense to put
together a list of modern language features currently treated
by stdcxx as optional (member templates, partial specialization,
etc.) that we will agree to assume robust support for from the
compiler. But I want that to be a conscious decision, not
something we allow to creep in without everyone's full
understanding of the implications.

> 
[...]
>>Just curious: why is ERROR_INVALID_NAME not handled in _rw_map_errno?
> 
>   Hmm, I get the map table from the sources of the MSVC crt (function
> _dosmaperr).
> I've already added handling of the ERROR_INVALID_NAME to the
> _rw_map_errno.

Got it!

> 
[...]
>   Because ERROR_INVALID_HANDLE by default is mapped to EBADF, but in
> this
> case ECHILD should be returned.

I see. Thanks.

Martin

Mime
View raw message