- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sample code (t0.c):
void f(void* p)
{
*p;
}
Invocation:
icc t0.c -std=c11 -pedantic -Wall -Wextra -c
Expected diagnostics:
dereferencing 'void *' pointer
Actual diagnostics:
<nothing>
Version:
icc 2021.5.0 on x86-64 on Linux
C11, 6.5.3.2 Address and indirection operators, Semantics, 4:
The unary * operator denotes indirection. If the operand points to a function, the result is a function designator; if it points to an object, the result is an lvalue designating the object.
C11, 6.3.2.1 Lvalues, arrays, and function designators, 1:
An lvalue is an expression (with an object type other than void) that potentially designates an object; ...
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Intel Communities.
The issue raised by you is reproducible from our end with icc compiler.
Could you please try compiling with Intel C++ compiler 2022 (icx) instead?
The icx compiler is working as expected by throwing a warning as mentioned.
Thanks & Regards,
Madhu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@MadhuK_Intel Update. Actually for the unary * operator there is no constraint "the operand shall not be a pointer to void" (or similar). One of the reasons is to support &*p
. Hence, it seems that this issue is "not a problem". However, as a quality-of-implementation matter Intel C compiler can diagnose it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The formatting is lost again: formatting_during_editing != formatting_after_saving. Please fix (if possible).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pavel,
We have reported this issue to the concerned development team. They are looking into your issue.
>>"The formatting is lost again"
We could not see such an issue now. Please do check and let us know if you still face the issue.
Best Regards,
Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The version against which you reported your issue is no longer targeted for fixes. Please check out the new versions of Intel oneAPI Toolkits for the latest features. Please post a new question if you need any additional information from Intel, as this thread will no longer be monitored.
Best regards,
Madhu

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