public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46024] New: g++.dg/warn/miss-format-1.C FAILs on Solaris 8 and 9
@ 2010-10-14 18:24 ro at gcc dot gnu.org
  2010-10-19 12:54 ` [Bug c++/46024] " ro at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-14 18:24 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: g++.dg/warn/miss-format-1.C FAILs on Solaris 8 and 9
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
              Host: i386-pc-solaris2.[89], sparc-sun-solaris2.8
            Target: i386-pc-solaris2.[89], sparc-sun-solaris2.8
             Build: i386-pc-solaris2.[89], sparc-sun-solaris2.8


Created attachment 22043
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22043
preprocessed input (from Solaris 8/x86) for miss-format-1.C

The g++.dg/warn/miss-format-1.C FAILs on both Solaris 8 and 9/x86 and
Solaris 8/SPARC, but not on Solaris 9/SPARC:

i386-pc-solaris2.8:

FAIL: g++.dg/warn/miss-format-1.C printf attribute warning (test for warnings,
line 17)
FAIL: g++.dg/warn/miss-format-1.C printf attribute warning 2 (test for
warnings, line 42)
FAIL: g++.dg/warn/miss-format-1.C (test for excess errors)

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/warn/miss-format-1.C:26:18:
error: 'vscanf' was not declared in this scope

i386-pc-solaris2.9:

FAIL: g++.dg/warn/miss-format-1.C printf attribute warning (test for warnings,
line 17)
FAIL: g++.dg/warn/miss-format-1.C printf attribute warning 2 (test for
warnings, line 42)

sparc-sun-solaris2.8:

FAIL: g++.dg/warn/miss-format-1.C (test for excess errors)

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/warn/miss-format-1.C:26:18:
error: 'vscanf' was not declared in this scope

It seems strange to get that excess error even though there's a dg-error
covering exactly that situation.

But what's even more strange is that the Solaris 8 and 9/x86 compilers don't
warn for lines 17 and 42 for exactly the same preprocessed input that the
Solaris 8/SPARC compiler warns about:

s8sparc% gcc -Wmissing-format-attribute -S miss-format-1.ii
miss-format-1.ii: In function 'void foo(const char*, ...)':
miss-format-1.ii:123:19: warning: function might be possible candidate for
'gnu_printf' format attribute [-Wmissing-format-attribute]
miss-format-1.ii: In function 'void bar(const char*, ...)':
miss-format-1.ii:131:18: error: 'vscanf' was not declared in this scope
miss-format-1.ii: In function 'void vfoo(const char*, va_list)':
miss-format-1.ii:145:20: warning: function might be possible candidate for
'gnu_printf' format attribute [-Wmissing-format-attribute]
s9x86% gcc -Wmissing-format-attribute -S miss-format-1.ii
miss-format-1.s8x86.ii: In function 'void bar(const char*, ...)':
miss-format-1.s8x86.ii:131:18: error: 'vscanf' was not declared in this scope

I'd have expected such a warning to be target-independent.


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

end of thread, other threads:[~2010-10-21 17:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-14 18:24 [Bug c++/46024] New: g++.dg/warn/miss-format-1.C FAILs on Solaris 8 and 9 ro at gcc dot gnu.org
2010-10-19 12:54 ` [Bug c++/46024] " ro at gcc dot gnu.org
2010-10-20 17:36 ` ro at gcc dot gnu.org
2010-10-21 17:14 ` ro at gcc dot gnu.org
2010-10-21 17:23 ` ro at gcc dot gnu.org
2010-10-21 17:26 ` ro at gcc dot gnu.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).