qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stitcher (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-6718) parsing errors for integer literals in selectors
Date Tue, 01 Sep 2015 19:39:46 GMT

    [ https://issues.apache.org/jira/browse/QPID-6718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14725941#comment-14725941

Andrew Stitcher commented on QPID-6718:

The 'l"/'L' suffix isn't accepted by the parser, but only after it tokenises and tries to
parse what comes before.

It turns out that 9223372036854775807 is accepted as a valid numeric, but -9223372036854775808
is not (this is a feature of the internals of the lexical_cast implementation which probably
uses the streaming operators ("<<"/">>") under the covers).

There are other bits of necessary syntax too (which are not supported by lexical_cast as far
as I know - "0b"/"0B" prefix for binary numbers, and most significantly treating underscore
('_') as a separator character in exact numeric literals.

There seem to be some approx numeric syntax pieces missing too - hex floating point and 'f'/'F'/'d'/'D'

> parsing errors for integer literals in selectors
> ------------------------------------------------
>                 Key: QPID-6718
>                 URL: https://issues.apache.org/jira/browse/QPID-6718
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Client
>    Affects Versions: qpid-cpp-0.34
>            Reporter: Gordon Sim
>            Assignee: Andrew Stitcher
>            Priority: Minor
> There are a few integer literals that cause selector parsing to fail or the resulting
evaluation to be incorrect:
> (a) hexadecimal literals don't seem to be recognised, e.g. 0xFF will result in a parse
> (b) octal literals are evaluated as decimal e.g 077 is interpreted as decimal 77 rather
than decimal 63
> (c) large numbers fail with a lexical cast error, e.g -9223372036854775808L or 9223372036854775807L

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message