Package: cc1111
Version: 2.9.0-4
Severity: normal

When I compile the following code:

    struct s {
        int v;
    };

    struct t {
        struct s *ptr;
    };

    void *address;

    struct t __code problem = {
        (struct s *) &address,
    };

I get the following warning messages:

    bug.c:12: warning 18: Initializer different levels of indirections
    from type 'struct s near* '
    to type 'struct s generic* '
    bug.c:12: warning 18: Initializer different levels of indirections
    from type 'void generic*  near* '
    to type 'struct s generic* '

(A minor bug is that it's printed twice.)

If I compile with --disable-warning 18, I expect to see no warnings,
but instead I get:

    from type 'struct s near* '
    to type 'struct s generic* '
    from type 'void generic*  near* '
    to type 'struct s generic* '

The two "extra" lines of each warning are not properly suppressed.

A final mystery (to me, at least) is that the declaration

    struct t no_problem = {
        (struct s *) &address,
    };

compiles without any warnings.  Why does the __code storage class
affect it?


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to