public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug translation/15483] New: gcc lexes hexadecimal floating-point constants incorrectly
@ 2004-05-17 14:22 das at FreeBSD dot ORG
  2004-05-17 14:30 ` [Bug c/15483] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: das at FreeBSD dot ORG @ 2004-05-17 14:22 UTC (permalink / raw)
  To: gcc-bugs

Below is a demonstration of two bugs.  The first is a lexer bug,
and the second is in real_from_string(), and probably fixable
with the following change to real.c:
<  if (str[0] == '0' && str[1] == 'x')
>  if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X'))

das@VARK:~> gcc --version
gcc (GCC) 3.3.3 [FreeBSD] 20031106
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
das@VARK:~> echo "double x = 0x.1p3;" > f.c
das@VARK:~> gcc f.c -Wall
f.c:1:12: invalid suffix "x.1p3" on integer constant         <--- BUG
das@VARK:~> cat > g.c
#include <stdio.h>
int main(int argc, char *argv[]) {
        printf("%e\n", 0X0.5p2);
        return (0);
}
das@VARK:~> gcc g.c -Wall
das@VARK:~> ./a.out
0.000000e+00                                                 <--- BUG

-- 
           Summary: gcc lexes hexadecimal floating-point constants
                    incorrectly
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: translation
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: das at FreeBSD dot ORG
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15483


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/15483] gcc lexes hexadecimal floating-point constants incorrectly
  2004-05-17 14:22 [Bug translation/15483] New: gcc lexes hexadecimal floating-point constants incorrectly das at FreeBSD dot ORG
@ 2004-05-17 14:30 ` pinskia at gcc dot gnu dot org
  2004-05-17 15:03 ` das at FreeBSD dot ORG
  2004-05-17 15:05 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-17 14:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-17 00:39 -------
This is a dup of bug 14088 which is fixed for 3.4.0.

*** This bug has been marked as a duplicate of 14088 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|translation                 |c
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15483


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/15483] gcc lexes hexadecimal floating-point constants incorrectly
  2004-05-17 14:22 [Bug translation/15483] New: gcc lexes hexadecimal floating-point constants incorrectly das at FreeBSD dot ORG
  2004-05-17 14:30 ` [Bug c/15483] " pinskia at gcc dot gnu dot org
@ 2004-05-17 15:03 ` das at FreeBSD dot ORG
  2004-05-17 15:05 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: das at FreeBSD dot ORG @ 2004-05-17 15:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From das at FreeBSD dot ORG  2004-05-17 00:49 -------
Subject: Re:  gcc lexes hexadecimal floating-point constants incorrectly

On Mon, May 17, 2004, pinskia at gcc dot gnu dot org wrote:
> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-17 00:39 -------
> This is a dup of bug 14088 which is fixed for 3.4.0.

Thanks for the quick response.  Please note that 14088 covers only
one of the two problems I pointed out.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15483


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/15483] gcc lexes hexadecimal floating-point constants incorrectly
  2004-05-17 14:22 [Bug translation/15483] New: gcc lexes hexadecimal floating-point constants incorrectly das at FreeBSD dot ORG
  2004-05-17 14:30 ` [Bug c/15483] " pinskia at gcc dot gnu dot org
  2004-05-17 15:03 ` das at FreeBSD dot ORG
@ 2004-05-17 15:05 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-17 15:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-17 00:56 -------
Yes but the patch fixed both of them.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15483


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-17  0:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-17 14:22 [Bug translation/15483] New: gcc lexes hexadecimal floating-point constants incorrectly das at FreeBSD dot ORG
2004-05-17 14:30 ` [Bug c/15483] " pinskia at gcc dot gnu dot org
2004-05-17 15:03 ` das at FreeBSD dot ORG
2004-05-17 15:05 ` pinskia at gcc dot gnu dot org

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).