- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, the programs that use _Complex in the compiler doc have been mentioned in the doc to work, but I could not get them working.
Following is a small test-case for the same:--
[bash]#include#include int main() { float _Complex C; return 1; }[/bash]
This small piece of code does not work (I have only checked with Windows* as of now with 11.1 compiler)..
I am using flag /Qstd=c99 , but am getting error that does not make much sense.
C:\\Documents and Settings\\mkulka3\\My Documents\\Intel-Docs\\KBstuff\\462642>icl /Qs
td=c99 comp3.cpp
Intel C++ Compiler for applications running on IA-32, Version 11.1 Build 2
0090421 Package ID: composer.061
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
comp3.cpp
C:\\Program Files\\Intel\\Parallel Studio\\Composer\\Include\\complex.h(30): warning #
1224: #warning directive: "The /Qstd=c99 compilation option is required to enabl
e C99 support for C programs"
# warning "The /Qstd=c99 compilation option is required to enable C99 support
for C programs"
^
comp3.cpp(5): error: expected a ";"
float _Complex C;
^
compilation aborted for comp3.cpp (code 2)
-------------------------------------------------------------
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh I did a small mistake. Renaming .cpp to .c file compiles correctly, as its allowed only for C language. Not for C++ language, as specifically mentioned in the compiler doc.
Any specific reason that we do not allow _Complex in C++ . Its just like any other datatype, and should work in C++ also, or is it according to standard specification?
Because the same C++ (with .cpp extension) program works in Linux* compiler, so why not in Windows* compilers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
_Complex ispart ofthe C99 language standard, not the C++ standard. C++ users are expected to use the templatized complex types available in the C++ standard library, i.e.
#include
int main() {
std::complex
return 0;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone got double _Complex working in Visual Studio? I have an existing C project that uses this but have not been able to configure VS with icl such that is compiles, despite being able to compile using icl from the command line.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page