public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23103] New: gcc_diag does not work with -combine
@ 2005-07-27 22:03 pinskia at gcc dot gnu dot org
  2005-08-01 16:57 ` [Bug c/23103] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
  2005-09-27 16:15 ` mmitchel at gcc dot gnu dot org
  0 siblings, 2 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-27 22:03 UTC (permalink / raw)
  To: gcc-bugs

Try compiling the following two source with -combine -Wformat and you will end of with an error 
which is wrong:
--- file1.c ---

typedef long long __gcc_host_wide_int__;

typedef struct location_s
{
  const char *file;
  int line;
} location_t;

union tree_node;
typedef union tree_node *tree;

extern int diag (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))) __attribute__ 
((__nonnull__));;

void
foo (location_t *loc)
{
  diag ("%H", loc);
}

---- end ----
---- file2.c ----

typedef long long __gcc_host_wide_int__;

typedef struct location_s
{
  const char *file;
  int line;
} location_t;

union tree_node;
typedef union tree_node *tree;

extern int diag (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))) __attribute__ 
((__nonnull__));;

void
foo1 (location_t *loc)
{
  diag ("%H", loc);
}

---- end ----

-- 
           Summary: gcc_diag does not work with -combine
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: diagnostic, build
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-10-26  2:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23103-6528@http.gcc.gnu.org/bugzilla/>
2005-10-13 20:00 ` [Bug c/23103] [4.0/4.1 Regression] gcc_diag does not work with -combine pinskia at gcc dot gnu dot org
2005-10-15 18:29 ` pinskia at gcc dot gnu dot org
2005-10-15 18:29 ` pinskia at gcc dot gnu dot org
2005-10-26  2:15 ` cvs-commit at gcc dot gnu dot org
2005-10-26  2:20 ` cvs-commit at gcc dot gnu dot org
2005-10-26  2:20 ` pinskia at gcc dot gnu dot org
2005-07-27 22:03 [Bug c/23103] New: " pinskia at gcc dot gnu dot org
2005-08-01 16:57 ` [Bug c/23103] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-27 16:15 ` mmitchel 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).