Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Jacques Savoy
Fri, 15 Sep 1989 19:36
Preprocessor and misspelling word
Author: Jacques Savoy
Date: Fri, 15 Sep 1989 19:36
Date: Fri, 15 Sep 1989 19:36
53 lines
2108 bytes
2108 bytes
I have found the following problem with the preprocessor :
if you misspell a token (privte indeed of private), you have
the following message :
"Errors detected in input file (your bison.simple is out of date) "
This message can't help me because i don't WHERE the preprocessor
found the misspelled word. (Think if you have many headers or
included files, the problem is very painful).
Here is an example :
---------------------------------------------------------------------
// File test.cc
#include <stream.h>
class X {
privte: // spelling error private must used indeed !
int val;
public:
X(int i) { val = i; }
X(char* pt) { val = strlen(pt); }
int value() { return val; }
};
main(int argc, char* argv[])
{
cout << "Enf of job \n";
exit(0);
}
// EOF test.cc
--------------------------------------------------------------------------
Compiling the file with :
$ g++ test.cc -o test -v
g++ version 1.35.0
/usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ test.cc /tmp/cca23831.cpp
GNU CPP version 1.35
/usr/local/lib/gcc-cc1plus /tmp/cca23831.cpp -quiet -dumpbase test.cc -noreg -version -o /tmp/cca23831.s
GNU C++ version 1.35.0 (sparc) compiled by GNU C version 1.35.
Errors detected in input file (your bison.simple is out of date) as /tmp/cca23831.s -o test.o
/usr/local/lib/gcc-ld++ -o test -C /usr/local/lib/crt0+.o test.o -lg++ /usr/local/lib/gcc-gnulib -lc
crt0.c:731: Undefined symbol _main referenced from text
-------------------------------------------------------------------------------
J.SAVOY
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads