Can't use '::' with isspace
Philipp Thomas
pthomas@suse.de
Wed Feb 2 21:05:00 GMT 2000
* Tron Thomas (tron.thomas@sierra.com) [20000203 05:38]:
> #include <ctype.h>
>
> int main(void)
> {
> ::isspace(32);
> }
>
> This produces the following results:
>
> foo.cpp: In function `int main()':
> foo.cpp:5: parse error before `('
You didn't tell, which version of gcc you're using. But you most probably
got bitten by fact that isspace is a macro, not a function. The current CVS
version gives:
In function `int main ()':
parse error before `_ctype_b'
which is correct, because if you look at the preprocessed output, isspace
gets expanded to a test and scope resolution on that is illegal.
int main(void)
{
::(__ctype_b[(int) ((32))] & (unsigned short int) _ISspace);
}
--
Philipp Thomas <pthomas@suse.de>
SuSE GmbH, Deutschherrenstrasse 15-29, 90429 Nuremberg
Romantik ist... ...einen Winterabend gemeinsam vor xsnow zu verbringen
Andre Deparade in de.talk.romance
More information about the Gcc-bugs
mailing list