public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20401] New: error message is misleading
@ 2005-03-10  9:46 papadopo at shfj dot cea dot fr
  2005-03-10  9:48 ` [Bug c++/20401] " papadopo at shfj dot cea dot fr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: papadopo at shfj dot cea dot fr @ 2005-03-10  9:46 UTC (permalink / raw)
  To: gcc-bugs

The error message in this case is misleading:

$ cat foo.cc
#include <unistd.h>

namespace foo {
typedef long long offset_t;
}

using namespace std;
using namespace foo;

int main() {
    offset_t fpos;
}
$ 
$ g++ -c foo.cc
foo.cc: In function `int main()':
foo.cc:11: error: `offset_t' undeclared (first use this function)
foo.cc:11: error: (Each undeclared identifier is reported only once for each
   function it appears in.)
foo.cc:11: error: parse error before `;' token
$ 

Actually 'offset_t' is declared twice, once in the global namespace in Solaris'
<sys/types.h> and once in the foo namespace.

-- 
           Summary: error message is misleading
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: papadopo at shfj dot cea dot fr
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: sparc-sun-solaris2.8


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


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

* [Bug c++/20401] error message is misleading
  2005-03-10  9:46 [Bug c++/20401] New: error message is misleading papadopo at shfj dot cea dot fr
@ 2005-03-10  9:48 ` papadopo at shfj dot cea dot fr
  2005-03-10  9:49 ` papadopo at shfj dot cea dot fr
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: papadopo at shfj dot cea dot fr @ 2005-03-10  9:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From papadopo at shfj dot cea dot fr  2005-03-10 09:48 -------
Created an attachment (id=8371)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8371&action=view)
test case


-- 


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


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

* [Bug c++/20401] error message is misleading
  2005-03-10  9:46 [Bug c++/20401] New: error message is misleading papadopo at shfj dot cea dot fr
  2005-03-10  9:48 ` [Bug c++/20401] " papadopo at shfj dot cea dot fr
@ 2005-03-10  9:49 ` papadopo at shfj dot cea dot fr
  2005-03-10 19:55 ` bangerth at dealii dot org
  2005-03-10 19:56 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: papadopo at shfj dot cea dot fr @ 2005-03-10  9:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From papadopo at shfj dot cea dot fr  2005-03-10 09:49 -------
Created an attachment (id=8372)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8372&action=view)
stripped down test case


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #8371 is|0                           |1
           obsolete|                            |


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


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

* [Bug c++/20401] error message is misleading
  2005-03-10  9:46 [Bug c++/20401] New: error message is misleading papadopo at shfj dot cea dot fr
  2005-03-10  9:48 ` [Bug c++/20401] " papadopo at shfj dot cea dot fr
  2005-03-10  9:49 ` papadopo at shfj dot cea dot fr
@ 2005-03-10 19:55 ` bangerth at dealii dot org
  2005-03-10 19:56 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: bangerth at dealii dot org @ 2005-03-10 19:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2005-03-10 19:55 -------
This is a duplicate of a good number of other PRs. I don't have the time 
right now to find them, though... 
 
W. 

-- 


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


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

* [Bug c++/20401] error message is misleading
  2005-03-10  9:46 [Bug c++/20401] New: error message is misleading papadopo at shfj dot cea dot fr
                   ` (2 preceding siblings ...)
  2005-03-10 19:55 ` bangerth at dealii dot org
@ 2005-03-10 19:56 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-10 19:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-10 19:56 -------
I could sware I closed this as a dup of bug 100 before.

*** This bug has been marked as a duplicate of 100 ***

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


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


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

end of thread, other threads:[~2005-03-10 19:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-10  9:46 [Bug c++/20401] New: error message is misleading papadopo at shfj dot cea dot fr
2005-03-10  9:48 ` [Bug c++/20401] " papadopo at shfj dot cea dot fr
2005-03-10  9:49 ` papadopo at shfj dot cea dot fr
2005-03-10 19:55 ` bangerth at dealii dot org
2005-03-10 19:56 ` 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).