public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13560] New: wrong file name in error message
@ 2004-01-04  3:18 pinskia at gcc dot gnu dot org
  2004-01-04  3:20 ` [Bug c++/13560] " pinskia at gcc dot gnu dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-04  3:18 UTC (permalink / raw)
  To: gcc-bugs

Compile the following and you will get:
test.h: In function `int main()':
test.h:3: error: `int t::g' is private
test.cc:7: error: within this context
See how it says main is in test.h, this is wrong.
The problem is in cp_error_at set the location information but since the "In function ..." 
has not been printed yet for this function so it prints with the location information which 
cp_error_at sets which is wrong, one way to fix this is to add a new location_t to 
diagnostic_info to store the old one for printing out the "In function ..." message.

----- preprocessed source -----
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.cc"
# 1 "test.h" 1
class t
{
 int g;
};
void h(t&);
# 2 "test.cc" 2

int main()
{
  t y;
  h(y);
  return y.g;
}

-- 
           Summary: wrong file name in error message
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: c++
        AssignedTo: gdr at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: carlo at alinoe dot com,gcc-bugs at gcc dot gnu dot
                    org,igodard at pacbell dot net


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


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

end of thread, other threads:[~2005-04-30 14:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-04  3:18 [Bug c++/13560] New: wrong file name in error message pinskia at gcc dot gnu dot org
2004-01-04  3:20 ` [Bug c++/13560] " pinskia at gcc dot gnu dot org
2004-01-06 15:16 ` [Bug c++/13560] [3.3/3.4 regression] " bangerth at dealii dot org
2004-01-06 20:58 ` pinskia at gcc dot gnu dot org
2004-01-11  1:17 ` pinskia at gcc dot gnu dot org
2004-01-12 20:06 ` bangerth at dealii dot org
2004-01-13  4:28 ` pinskia at gcc dot gnu dot org
2004-01-14  5:40 ` pinskia at gcc dot gnu dot org
2004-03-02  5:51 ` [Bug c++/13560] [3.3/3.4/3.5 " mmitchel at gcc dot gnu dot org
2004-06-09 19:24 ` mmitchel at gcc dot gnu dot org
2004-06-18 23:46 ` mmitchel at gcc dot gnu dot org
2004-08-29 18:51 ` mmitchel at gcc dot gnu dot org
2004-10-09  1:28 ` [Bug c++/13560] [3.3/3.4/4.0 " pinskia at gcc dot gnu dot org
2004-10-21 16:15 ` cvs-commit at gcc dot gnu dot org
2004-10-21 16:16 ` [Bug c++/13560] [3.3/3.4 " pinskia at gcc dot gnu dot org
2004-10-28  3:49 ` cvs-commit at gcc dot gnu dot org
2004-10-28  3:50 ` [Bug c++/13560] [3.3 " pinskia at gcc dot gnu dot org
2005-04-30 14:31 ` gdr 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).