Bug 16433 - wrong hexadecimal constant warning
Summary: wrong hexadecimal constant warning
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic, patch
Depends on:
Blocks:
 
Reported: 2004-07-08 13:01 UTC by David Billinghurst
Modified: 2004-07-12 05:41 UTC (History)
1 user (show)

See Also:
Host: i686-pc-cygwin
Target: i686-pc-cygwin
Build: i686-pc-cygwin
Known to work:
Known to fail:
Last reconfirmed: 2004-07-11 12:29:18


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Billinghurst 2004-07-08 13:01:59 UTC
The following code, derived from g77.dg/pr5473.f, gives an incorrect warning.
I think it is standard Fortran 77/90/95.

      real x
      double precision dx
      x = 2.0
      dx = x
      end


/usr/local/obj/gcc-f/gcc/testsuite/../gfortran -B/usr/local/obj/gcc-
f/gcc/testsuite/../ /usr/local/src/gcc/gcc/testsuite/gfortran.dg/pr5473a.f -
O0 -pedantic-errors -S -o pr5473a.s
 In file /usr/local/src/gcc/gcc/testsuite/gfortran.dg/pr5473a.f:4

      dx = x
           1
Warning: Extension: Hexadecimal constant at (1) uses non-standard syntax.
Comment 1 Tobias Schlüter 2004-07-11 14:50:13 UTC
Patch here: http://gcc.gnu.org/ml/fortran/2004-07/msg00127.html
Comment 2 CVS Commits 2004-07-11 15:06:45 UTC
Subject: Bug 16433

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-07-11 15:06:43

Modified files:
	gcc/fortran    : ChangeLog primary.c 

Log message:
	PR fortran/16433
	* primary.c (match_boz_constant): Call gfc_notify_std only if
	we actually have a non-standard boz-literal-constant.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.121&r2=1.122
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&r1=1.7&r2=1.8

Comment 3 Tobias Schlüter 2004-07-11 15:07:31 UTC
Fixed.
Comment 4 CVS Commits 2004-07-11 15:21:54 UTC
Subject: Bug 16433

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-07-11 15:21:52

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: pr16433.f 

Log message:
	PR fortran/16433
	* gfortran.dg/pr16433.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3983&r2=1.3984
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr16433.f.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 5 CVS Commits 2004-07-11 16:52:52 UTC
Subject: Bug 16433

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-07-11 16:52:50

Modified files:
	gcc/fortran    : expr.c lang.opt options.c 

Log message:
	PR fortran/16433
	* gfortran.dg/pr16433.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/expr.c.diff?cvsroot=gcc&r1=1.9&r2=1.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/lang.opt.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/options.c.diff?cvsroot=gcc&r1=1.5&r2=1.6