- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sample code:
extern volatile void x;
void f(void)
{
return x;
}
Invocation:
$ icc t0.c -std=c11 -pedantic -Wall -Wextra -c
Expected diagnostics:
warning: a return statement with an expression shall not appear in a function whose return type is void
Actual diagnostics:
t0.c(1): warning #21: type qualifiers are meaningless in this declaration
extern volatile void x;
^
": internal error: ** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.
Version:
icc 2021.5.0 on x86-64 on Linux
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also: the editor inserts unwanted:
<p> </p>
<p> </p>
Even if they have been manually removed, then the editor still inserts (it seems on "Save edits" operation) them.
Please fix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
>"Expected diagnostics: warning: a return statement with an expression shall not appear in a function whose return type is void"
Could you please let us know the standard reference based on which you are mentioning expected behavior so that we could consider your error/warning description?
>"Also: the editor inserts unwanted:
<p> </p>
<p> </p>"
Could you please elaborate on the issue, and please provide more information regarding the same so that we could investigate it.
Thanks & Regards,
Madhu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@MadhuK_Intel
C11, 6.8.6.4 The return statement, Constraints, 1
> A return statement with an expression shall not appear in a function whose return type is void.
About: "the editor inserts unwanted". After the post has been edited, and saved via "Save edits", the final post contains `<p> </p>`, which were _not_ present in the post. It seems that they have been auto-inserted on "Save edits".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pavel,
>>"C11, 6.8.6.4 The return statement, Constraints, 1"
We have reported this issue to the concerned development team. They are looking into your issue.
>>"the editor inserts unwanted"
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 Pavel,
Not sure if you are aware of it, but the Intel C++ Classic compiler will enter "Legacy Product Support" mode signaling the end of regular updates. Please see the below article for more details.
So we suggest you try with the Intel C++ Compiler 2022 (icx) as it is working as expected when we checked it from our end.
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