- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had this code for years:
[bash]# pragma warning(disable:810) /* conversion may lose significant bits */ # pragma warning(disable:69) /* integer conversion resulted in truncation */ [/bash] but sometime, maybe when we started using v11, these stopped suppressing the error. I found on a board somewhere this syntax:[bash]#pragma warning disable 810 /* conversion ... may lose significant bits */ #pragma warning disable 69 /* integer conversion resulted in truncation */ [/bash] which now works fine. Did something change somewhere? This is on Windows, icl 11.1.060.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you please give usa complete example, i.e. a test case and your compilation command?
I tried this simpletest case which disables warning 1079 (return type of function main must be int)with 11.1 and it works as expected:
#pragma warning (disable:1079)
void main() {}
thanks,
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please show a complete example where you think these pragmas are not working.
I created this example which works as expected:
!% cat t.cpp
struct Base {};
#pragma warning push
#pragma warning(disable:304)
struct Derived: Base {}; // remark is disabled here
#pragma warning pop
struct Derived2: Base {}; // but not here
!% icl -c -W5 t.cpp
Intel(R) C++ Compiler XE for applications running on IA-32, Version Mainline Bet
a Build x
Built Mar 17 2013 16:26:48 by jward4 on JWARD4-DESK in D:/workspaces/46cfe/dev
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
t.cpp
t.cpp(9): remark #304: access control not specified ("public" by default)
struct Derived2: Base {}; // but not here
^
!%
thanks!
Judy
P.S. If the class is a template class you need to have the diagnostic disabled at the point of the instantiation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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