This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Undue warning introduced by libcpp patch
- From: FX <fxcoudert at gmail dot com>
- To: "Daniel Franke" <franke dot daniel at gmail dot com>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Thu, 29 May 2008 16:50:29 +0100
- Subject: Undue warning introduced by libcpp patch
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=Bf/c6YWwFVNx/SpmNdbLt7krPt9eubLHOk9v9Yi1BLU=; b=cbbyj5zLzUa7Pn+QYP5YCCQmUdVwpbPzGAP/vzOJsFwimjY7fmCNR7L3B1KVmMKGJtfAI7dLIczlHXGIe9UA94DdkNnY2Uily7GNbNdsJePBvB0LegVYh1rEljwsNHSVnQ86FbCvKGE94u+Hv1/AJuayd2B/rijyDb9uJC5YXJQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=lzF/Zc1IUNJ3cqrwp6Xt3otUAgg7ps7qkib5BfL1NrL0PqTzoaAX+d6Wx/AW+/MFRJyXfD6XzkPBfB7zr+DXval5hhXh6DgPbU47fX6xsqdf7JA9QHaXRKPIMIvivbE0UsvwGGrxC16DpojkohCqFmpCv2e4sMgPVM1wXUaRhyU=
Hi Daniel,
I understand you have your lot of bootstraps to fix, but when you get
time, here are three small issues introduced (I suppose) by your
patch.
1. When I compile a .F90 file with -save-temps, I get:
f951: warning: command line option "-fpch-preprocess" is valid for
C/C++/ObjC/ObjC++ but not for Fortran
2. When I compile a .F90 file with -E, no newline is appended at the
end of the last line of output
3. If I compile the following a.F90 file:
# 1 "a.F90"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "a.F90"
print *, "foo" "bar""gee"
end
with "gfortran -E", I get garbage in the output:
# 1 "a.F90"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "a.F90"
# 1 "a.F90*"
# 1 "<built-in>ßâ*"
# 1 "<command-line>"
# 1 "a.F90*"
print *, "foo" "bar""gee"
end
and valgrind says:
==28934== Invalid read of size 1
==28934== at 0x4A1C713: strlen (mc_replace_strmem.c:246)
==28934== by 0x410D99: print_line (cpp.c:753)
==28934== by 0xB53574: do_linemarker (directives.c:993)
==28934== by 0xB51F98: _cpp_handle_directive (directives.c:483)
==28934== by 0xB624DE: _cpp_scan_out_logical_line (traditional.c:634)
==28934== by 0xB62BF6: _cpp_read_logical_line_trad (traditional.c:305)
==28934== by 0x41105F: gfc_cpp_preprocess (cpp.c:699)
==28934== by 0x46FB35: gfc_new_file (scanner.c:1916)
==28934== by 0x48720C: gfc_init (f95-lang.c:295)
==28934== by 0x704A88: toplev_main (toplev.c:2045)
==28934== by 0x4B3B4C9: (below main) (in /usr/lib/debug/libc-2.3.6.so)
==28934== Address 0x4E2C13D is 0 bytes after a block of size 5 alloc'd
==28934== at 0x4A1B95B: realloc (vg_replace_malloc.c:306)
==28934== by 0xB7713C: xrealloc (xmalloc.c:179)
==28934== by 0xB648DC: cpp_interpret_string (charset.c:1392)
==28934== by 0xB64E90: cpp_interpret_string_notranslate (charset.c:1416)
==28934== by 0xB5360A: do_linemarker (directives.c:956)
==28934== by 0xB51F98: _cpp_handle_directive (directives.c:483)
==28934== by 0xB624DE: _cpp_scan_out_logical_line (traditional.c:634)
==28934== by 0xB62BF6: _cpp_read_logical_line_trad (traditional.c:305)
==28934== by 0x41105F: gfc_cpp_preprocess (cpp.c:699)
==28934== by 0x46FB35: gfc_new_file (scanner.c:1916)
==28934== by 0x48720C: gfc_init (f95-lang.c:295)
==28934== by 0x704A88: toplev_main (toplev.c:2045)
FX
--
FX Coudert
http://www.homepages.ucl.ac.uk/~uccafco/