This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Fwd: Re: wrong C++ error ?


Hi All,

The following code (well, fragment):

  class KProcess : public QObject
  {
    ...
  public:
    bool writeStdin(char *buffer, int buflen);
    ...
  }

  function()
  {
    string input;
    KProcess process;
    ...
    process.writeStdin( input.c_str(), input.length() )
    ...

gives the following error message:
  passing `const char *' as argument 1 of 
  `KProcess::writeStdin(char *,int)' discards qualifiers
To my mind this has to be a warning, not an error message.

This is with gcc version gcc-2.95 19990527 (prerelease)

I can provide the input file if necessary.

-- Jochen
 Heinrich-Heine-Universität Düsseldorf          jochen@uni-duesseldorf.de
 Institut für Physikalische Chemie I               phone ++49-211-8113681
 Universitätsstr. 26.43.02.29                      fax   ++49-211-8115195
 40225 Düsseldorf, Germany       www-public.rz.uni-duesseldorf.de/~jochen


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