This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

__get_c_string



If one includes <string> and compiles with -Wall, this warning appears:

.../include/g++-v3/bits/basic_string.h:974: warning: `const char *
__get_c_string(const string &)' defined but not used

The code in question is

    // for SGI exception classes
    static const char*
    __get_c_string(const string& __s) { return __s.c_str(); }

I know very little about the GNU __attribute__'s, but isn't there an
"unused" label that can be applied here?  Or does that cause problems when
the function is, in fact, used (presumably in an exception)?  Are there
macro wrappers around the attribute usages so that this file could be used
elsewhere?


Phil
(If you reply to the list, please don't cc another copy to me.  Thanks!)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]