public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/10425: function index should not live in the global namespace
@ 2003-04-17  8:06 frank.schmitt
  0 siblings, 0 replies; only message in thread
From: frank.schmitt @ 2003-04-17  8:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10425
>Category:       c++
>Synopsis:       function index should not live in the global namespace
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 17 08:06:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Frank Schmitt
>Release:        3.0.4, 3.1.1, 3.2.1 (not 2.96)
>Organization:
>Environment:
RedHat Linux 7.3, glibc-2.2.5-34, gcc 3.2.1
>Description:
gcc fails to compile a class named index if iostream is
included
>How-To-Repeat:
/* gccbug3.cpp
 *
 * compile with -Wall -ansi -pedantic
 * @author Frank Schmitt (frank.schmitt@4sc.com) 
 */

#include <iostream>

class index {
};

int main() {
  index i;
}
>Fix:
disable 
  char *index(const char *s, int c);
in string.h if compiled in strict ansi mode (probably rindex,
as well)
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-04-17  8:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-17  8:06 c++/10425: function index should not live in the global namespace frank.schmitt

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