public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60129] New: Imprecise column numbers in NOTEs on discarding const qualifiers from pointer target type
@ 2014-02-10  1:38 chengniansun at gmail dot com
  2014-02-10 10:08 ` [Bug c/60129] " manu at gcc dot gnu.org
  2014-02-11 12:53 ` mpolacek at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: chengniansun at gmail dot com @ 2014-02-10  1:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60129
           Summary: Imprecise column numbers in NOTEs on discarding const
                    qualifiers from pointer target type
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengniansun at gmail dot com

The column numbers in the NOTEs are not precise. They are especially not clear
when the function fn1() has two parameters of the same type. 

Regarding the column numbers in the warnings, I am not sure whether they are
expected as designed, as based on the warning message the user can still be
able to infer which parameter such a warning is about. 

$: cat incorrect-col-write-string.c
extern void fn1(char*, char*);
void fn2(const char* a) {
  fn1(a, a);
}
$: gcc-trunk -c incorrect-col-write-string.c
incorrect-col-write-string.c: In function ‘fn2’:
incorrect-col-write-string.c:3:3: warning: passing argument 1 of ‘fn1’ discards
‘const’ qualifier from pointer target type [enabled by default]
   fn1(a, a);
   ^
incorrect-col-write-string.c:1:13: note: expected ‘char *’ but argument is of
type ‘const char *’
 extern void fn1(char*, char*);
             ^
incorrect-col-write-string.c:3:3: warning: passing argument 2 of ‘fn1’ discards
‘const’ qualifier from pointer target type [enabled by default]
   fn1(a, a);
   ^
incorrect-col-write-string.c:1:13: note: expected ‘char *’ but argument is of
type ‘const char *’
 extern void fn1(char*, char*);
             ^
$
>From gcc-bugs-return-443161-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Feb 10 02:05:37 2014
Return-Path: <gcc-bugs-return-443161-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26783 invoked by alias); 10 Feb 2014 02:05:36 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 26727 invoked by uid 48); 10 Feb 2014 02:05:31 -0000
From: "amodra at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/58675] ICE in rs6000_secondary_reload_inner:15460, type = store
Date: Mon, 10 Feb 2014 02:05:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: amodra at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed
Message-ID: <bug-58675-4-eQeRUc5Qkp@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58675-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58675-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-02/txt/msg00918.txt.bz2
Content-length: 1139

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX675

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-10
                 CC|                            |amodra at gmail dot com
     Ever confirmed|0                           |1

--- Comment #3 from Alan Modra <amodra at gmail dot com> ---
I reckon this is overly restrictive checking in rs6000_secondary_reload_inner.

rtl during reload is a little messy.  I'll bet that
 (plus:DI (plus:DI (reg/f:DI 1 1)
                   (const_int 65536 [0x10000]))
          (const_int -30176 [0xffffffffffff8a20]))
has a reload pushed for the inner plus.

ie. what you really have here is
 (plus:DI (reg:DI some_gpr)
          (const_int -30176 [0xffffffffffff8a20]))
which is perfectly fine.

(No, I haven't looked at this testcase under gdb to confirm this is exactly
what is going on, but I've looked at reload enough in the past to risk an
opinion here.)


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

* [Bug c/60129] Imprecise column numbers in NOTEs on discarding const qualifiers from pointer target type
  2014-02-10  1:38 [Bug c/60129] New: Imprecise column numbers in NOTEs on discarding const qualifiers from pointer target type chengniansun at gmail dot com
@ 2014-02-10 10:08 ` manu at gcc dot gnu.org
  2014-02-11 12:53 ` mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu.org @ 2014-02-10 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-10
                 CC|                            |manu at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Chengnian Sun from comment #0)
> Regarding the column numbers in the warnings, I am not sure whether they are
> expected as designed, as based on the warning message the user can still be
> able to infer which parameter such a warning is about. 

Most of the warnings in GCC were implemented before column numbers were
available. Even now that there are, some of the location information necessary
to print accurate column numbers is not available at the point of warning. GCC
just needs more contributors willing to work on these issues.
>From gcc-bugs-return-443191-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Feb 10 10:11:22 2014
Return-Path: <gcc-bugs-return-443191-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26647 invoked by alias); 10 Feb 2014 10:11:21 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 26611 invoked by uid 48); 10 Feb 2014 10:11:17 -0000
From: "piotr.wyderski at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60132] New: C++11: lack of is_trivially_copy_constructible
Date: Mon, 10 Feb 2014 10:11:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: piotr.wyderski at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-60132-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-02/txt/msg00948.txt.bz2
Content-length: 887

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`132

            Bug ID: 60132
           Summary: C++11: lack of is_trivially_copy_constructible
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: piotr.wyderski at gmail dot com

The C++11 standard defines the content of <type_traits>
to contain, among other things,

    template <class T> struct is_trivially_copy_constructible;

GCC 4.8.2 does not provide this class.
There was a related renaming mess in
the late phase of the new standard definition
process (has_trivlal_destructor<T> etc.), so
IMHO this file needs a careful inspection to
check its conformance to the final version.

The bug has been found on Linux/x64 if this
fact is of any imnportance.


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

* [Bug c/60129] Imprecise column numbers in NOTEs on discarding const qualifiers from pointer target type
  2014-02-10  1:38 [Bug c/60129] New: Imprecise column numbers in NOTEs on discarding const qualifiers from pointer target type chengniansun at gmail dot com
  2014-02-10 10:08 ` [Bug c/60129] " manu at gcc dot gnu.org
@ 2014-02-11 12:53 ` mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-02-11 12:53 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I'll look into this in 5.0.  Seems that convert_for_assignment should use
expr_loc instead of location.


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

end of thread, other threads:[~2014-02-11 12:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-10  1:38 [Bug c/60129] New: Imprecise column numbers in NOTEs on discarding const qualifiers from pointer target type chengniansun at gmail dot com
2014-02-10 10:08 ` [Bug c/60129] " manu at gcc dot gnu.org
2014-02-11 12:53 ` mpolacek 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).