This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179054 - Problems with ::
Summary: Problems with ::
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-27 06:18 UTC by yuriy_lalym
Modified: 2013-05-07 11:21 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yuriy_lalym 2009-12-27 06:18:45 UTC
All good, no errors

In main.cpp

#include <cstdlib>
#include <cstdio>

/*
 * 
 */
int main(int argc, char** argv) {
    std::printf("");
    std::::::::printf("");          // :::::::: - ???
    std::fprintf(std::stderr, "");  // std::stderr - ???
    std::stderr();                  // - !!!???
    return (EXIT_SUCCESS);
}
Comment 1 yuriy_lalym 2009-12-27 06:26:33 UTC
#include <cstdlib>
#include <cstdio>

/*
 * 
 */
int main(int argc, char** argv) {
    std::printf("");
    std::::::::printf("");          // :::::::: - ???
    std::fprintf(std::stderr, "");  // std::stderr - ???
    std::stderr();                  // - !!!???
    std::snprintf();                // Unable to resolve identifier snprintf
    return (EXIT_SUCCESS);
}
Comment 2 nnnnnk 2010-01-18 10:44:11 UTC
What is wrong with stderr?
It's defined in stdio_iso.h
----
#if defined(__STDC__)
extern __FILE	__iob[_NFILE];
#define	stdin	(&__iob[0])
#define	stdout	(&__iob[1])
#define	stderr	(&__iob[2])
#else
extern __FILE	_iob[_NFILE];
#define	stdin	(&_iob[0])
#define	stdout	(&_iob[1])
#define	stderr	(&_iob[2])
#endif	/* __STDC__ */
----
Comment 3 nnnnnk 2010-01-18 10:56:52 UTC
std::::::::printf("");          // :::::::: - ???

It's a result of recovery.
printf is resolved as global function.
We do not highlight all incorrect code - only id's that could not be resolved.
Comment 4 yuriy_lalym 2010-01-18 13:16:57 UTC
1.
For me 15414 files of headers (total amount 89,4 Mb) but stdio_iso.h are absent.

In a file stdio.h it is unambiguously defined

/////////////////////////////////////////////////////////////////////////////
/* Standard streams.  */
extern struct _IO_FILE *stdin;		/* Standard input stream.  */
extern struct _IO_FILE *stdout;		/* Standard output stream.  */
extern struct _IO_FILE *stderr;		/* Standard error output stream.  */
#ifdef __STDC__
/* C89/C99 say they're macros.  Make them happy.  */
#define stdin stdin
#define stdout stdout
#define stderr stderr
#endif
/////////////////////////////////////////////////////////////////////////////

To all other it is not brought anywhere "stderr" to namespace "std".

And at all thus 

std::fprintf(std::stderr, ""); - good
std::stderr(); - good

And simultaneously with it

2.
std::snprintf(); // Unable to resolve identifier snprintf

As it is a correct code and it is handled by the compiler without errors, see
https://netbeans.org/bugzilla/show_bug.cgi?id=179048




3.
std::::::::printf("");   // We do not highlight all incorrect code
std:::::::printf("");    // And this what for highlight?
Comment 5 soldatov 2010-01-18 13:25:20 UTC
stdio_iso.h is exist on Solaris only
Comment 6 yuriy_lalym 2010-01-18 13:46:03 UTC
Platform: PC Linux ! See above.

In what difference between

std::::::::printf("");
std:::::::printf("");

c = a::+b
c::= a + b;

etc
Comment 7 nnnnnk 2010-03-18 14:42:01 UTC
We don't provide code validation.