public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/13804] New: Error message enhancement Request
@ 2004-01-22  2:07 don_sfw at dlaster dot com
  2004-01-22  2:11 ` [Bug c/13804] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: don_sfw at dlaster dot com @ 2004-01-22  2:07 UTC (permalink / raw)
  To: gcc-bugs

When developing developing software I will get this error once in a while
         structure has no member named '<member-name>'

due to typos and other typical development gotchas.  It would be useful if the
error message included the structure name if known or associated pointer or
variable if the compiler has the information available for the error message.

 I often use the same structure member names in mulitple structures since I use
names that convey the use of member.  If the message was something like this

          structure '<structure-name>' has no member named '<member-name>'

or this

          '<variable>' structure '<structure-name>' has no member named
'<member-name>'

it would make it easier to locate the proper reference in more complicated
statements.

-- 
           Summary: Error message enhancement Request
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: don_sfw at dlaster dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c/13804] Error message enhancement Request
  2004-01-22  2:07 [Bug c/13804] New: Error message enhancement Request don_sfw at dlaster dot com
@ 2004-01-22  2:11 ` pinskia at gcc dot gnu dot org
  2004-01-22  2:33 ` giovannibajo at libero dot it
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-22  2:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-22 02:11 -------
Confirmed on the mainline here is a small testcase to go with this report:
struct t
{
 int k;
};
void j()
{
  struct t p;
  p.d = 1;
}

We should say that d is not a member of the struct t.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-22 02:11:58
               date|                            |
            Summary|Error message enhancement   |Error message enhancement
                   |Request                     |Request
            Version|unknown                     |2.95


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


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

* [Bug c/13804] Error message enhancement Request
  2004-01-22  2:07 [Bug c/13804] New: Error message enhancement Request don_sfw at dlaster dot com
  2004-01-22  2:11 ` [Bug c/13804] " pinskia at gcc dot gnu dot org
@ 2004-01-22  2:33 ` giovannibajo at libero dot it
  2004-01-22  8:46 ` gdr at integrable-solutions dot net
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: giovannibajo at libero dot it @ 2004-01-22  2:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-01-22 02:33 -------
As a side note, the C++ frontend emits this diagnostic for the same testcase:

diag.cc: In function `void j()':
diag.cc:8: error: 'struct t' has no member named 'd'


-- 


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


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

* [Bug c/13804] Error message enhancement Request
  2004-01-22  2:07 [Bug c/13804] New: Error message enhancement Request don_sfw at dlaster dot com
  2004-01-22  2:11 ` [Bug c/13804] " pinskia at gcc dot gnu dot org
  2004-01-22  2:33 ` giovannibajo at libero dot it
@ 2004-01-22  8:46 ` gdr at integrable-solutions dot net
  2004-09-27 19:34 ` cvs-commit at gcc dot gnu dot org
  2004-09-27 20:19 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-22  8:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-01-22 08:46 -------
Subject: Re:  Error message enhancement Request

"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:

| As a side note, the C++ frontend emits this diagnostic for the same testcase:
| 
| diag.cc: In function `void j()':
| diag.cc:8: error: 'struct t' has no member named 'd'

Yes, this is because the C front-end uses a different diagnostic (more
primitive) infrastructure than C++.  I have been unifying them, but
did not have time to finish.

-- Gaby


-- 


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


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

* [Bug c/13804] Error message enhancement Request
  2004-01-22  2:07 [Bug c/13804] New: Error message enhancement Request don_sfw at dlaster dot com
                   ` (2 preceding siblings ...)
  2004-01-22  8:46 ` gdr at integrable-solutions dot net
@ 2004-09-27 19:34 ` cvs-commit at gcc dot gnu dot org
  2004-09-27 20:19 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-27 19:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-27 19:33 -------
Subject: Bug 13804

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jsm28@gcc.gnu.org	2004-09-27 19:33:55

Modified files:
	gcc            : ChangeLog c-typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr13804-1.c 

Log message:
	PR c/13804
	* c-typeck.c (build_component_ref): Name type involved in
	diagnostic for structure or union without a member of the given
	name.
	
	testsuite:
	* gcc.dg/pr13804-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5643&r2=2.5644
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.380&r2=1.381
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4358&r2=1.4359
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr13804-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c/13804] Error message enhancement Request
  2004-01-22  2:07 [Bug c/13804] New: Error message enhancement Request don_sfw at dlaster dot com
                   ` (3 preceding siblings ...)
  2004-09-27 19:34 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-27 20:19 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-27 20:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-27 20:19 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2004-09-27 20:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-22  2:07 [Bug c/13804] New: Error message enhancement Request don_sfw at dlaster dot com
2004-01-22  2:11 ` [Bug c/13804] " pinskia at gcc dot gnu dot org
2004-01-22  2:33 ` giovannibajo at libero dot it
2004-01-22  8:46 ` gdr at integrable-solutions dot net
2004-09-27 19:34 ` cvs-commit at gcc dot gnu dot org
2004-09-27 20:19 ` pinskia 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).