public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/40430]  New: collect2.c fails to compile: new qualifiers in middle of multi-level non-const cast are unsafe
@ 2009-06-12 16:32 ro at gcc dot gnu dot org
  2009-06-12 17:46 ` [Bug bootstrap/40430] " ian at gcc dot gnu dot org
  2009-06-12 17:57 ` ian at airs dot com
  0 siblings, 2 replies; 3+ messages in thread
From: ro at gcc dot gnu dot org @ 2009-06-12 16:32 UTC (permalink / raw)
  To: gcc-bugs

Between 20090522 (rev 147798) and 20090612 (rev 148427), collect2.c failed to
compile in stage2:

/vol/gccsrc/obj/gcc-4.5.0-20090612/6.5-gcc/./prev-gcc/xgcc
-B/vol/gccsrc/obj/gcc-4.5.0-20090612/6.5-gcc/./prev-gcc/
-B/vol/gcc/mips-sgi-irix6.5/bin/ -B/vol/gcc/mips-sgi-irix6.5/bin/
-B/vol/gcc/mips-sgi-irix6.5/lib/ -isystem /vol/gcc/mips-sgi-irix6.5/include
-isystem /vol/gcc/mips-sgi-irix6.5/sys-include     -g -O2 -DIN_GCC   -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual
-Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
 -DHAVE_CONFIG_H -I. -I. -I/vol/gcc/src/gcc-dist/gcc
-I/vol/gcc/src/gcc-dist/gcc/. -I/vol/gcc/src/gcc-dist/gcc/../include
-I/vol/gcc/src/gcc-dist/gcc/../libcpp/include -I/vol/gcc/include
-I/vol/gcc/include -I/vol/gcc/src/gcc-dist/gcc/../libdecnumber
-I/vol/gcc/src/gcc-dist/gcc/../libdecnumber/dpd -I../libdecnumber     \
        -DTARGET_MACHINE=\"mips-sgi-irix6.5\" \
        -c /vol/gcc/src/gcc-dist/gcc/collect2.c -o collect2.o 
cc1: warnings being treated as errors
/vol/gcc/src/gcc-dist/gcc/collect2.c: In function 'main':
/vol/gcc/src/gcc-dist/gcc/collect2.c:1170:8: error: new qualifiers in middle of
multi-level non-const cast are unsafe

I don't even understand what this message is supposed to mean.

It was probably introduced by this patch:

2009-06-01  Ian Lance Taylor  <iant@google.com>

        * attribs.c (register_attribute): Use CONST_CAST.
        * collect2.c (main): Use CONST_CAST2.
        (scan_prog_file): Likewise.
        * gcc.c (process_command, main): Likewise.
        * toplev.c (toplev_main): Likewise.

        * c-typeck.c (handle_warn_cast_qual): New static function,
        partially broken out of build_c_cast.
        (build_c_cast): Call handle_warn_cast_qual.
        * doc/invoke.texi (Warning Options): Document new effect of
        -Wcast-qual.


-- 
           Summary: collect2.c fails to compile: new qualifiers in middle of
                    multi-level non-const cast are unsafe
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ro at gcc dot gnu dot org
 GCC build triplet: mips-sgi-irix6.5
  GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5


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


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

* [Bug bootstrap/40430] collect2.c fails to compile: new qualifiers in middle of multi-level non-const cast are unsafe
  2009-06-12 16:32 [Bug bootstrap/40430] New: collect2.c fails to compile: new qualifiers in middle of multi-level non-const cast are unsafe ro at gcc dot gnu dot org
@ 2009-06-12 17:46 ` ian at gcc dot gnu dot org
  2009-06-12 17:57 ` ian at airs dot com
  1 sibling, 0 replies; 3+ messages in thread
From: ian at gcc dot gnu dot org @ 2009-06-12 17:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ian at gcc dot gnu dot org  2009-06-12 17:46 -------
Subject: Bug 40430

Author: ian
Date: Fri Jun 12 17:45:57 2009
New Revision: 148434

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148434
Log:
        PR bootstrap/40430
        * collect2.c (main): Use CONST_CAST2 in code inside #if
        LINK_ELIMINATE_DUPLICATE_LDIRECTORIES.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/collect2.c


-- 


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


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

* [Bug bootstrap/40430] collect2.c fails to compile: new qualifiers in middle of multi-level non-const cast are unsafe
  2009-06-12 16:32 [Bug bootstrap/40430] New: collect2.c fails to compile: new qualifiers in middle of multi-level non-const cast are unsafe ro at gcc dot gnu dot org
  2009-06-12 17:46 ` [Bug bootstrap/40430] " ian at gcc dot gnu dot org
@ 2009-06-12 17:57 ` ian at airs dot com
  1 sibling, 0 replies; 3+ messages in thread
From: ian at airs dot com @ 2009-06-12 17:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ian at airs dot com  2009-06-12 17:57 -------
Fixed.

The update to the docs in the patch you mention explain why this new warning is
appropriate for -Wcast-qual.  Let me know if you see how to make the docs
clearer.

http://gcc.gnu.org/viewcvs/trunk/gcc/doc/invoke.texi?r1=148037&r2=148053&diff_format=h


-- 

ian at airs dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2009-06-12 17:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-12 16:32 [Bug bootstrap/40430] New: collect2.c fails to compile: new qualifiers in middle of multi-level non-const cast are unsafe ro at gcc dot gnu dot org
2009-06-12 17:46 ` [Bug bootstrap/40430] " ian at gcc dot gnu dot org
2009-06-12 17:57 ` ian at airs dot com

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).