- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
trying to deprecate a "using" alias as in
using foo [[deprecated]] = int; int main() { foo f = 1; };
gives me
test-deprecate.cc(1): warning #2651: attribute does not apply to any entity using foo [[deprecated]] = int; ^ test-deprecate.cc(5): warning #1478: type "foo" (declared at line 1) was declared deprecated foo f = 1; ^
using ICC16, ICC17, ICC18 and ICC19. The deprecation is correctly detected by warning #1478 so #2651 is spurious here.
Best,
Daniel
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel,
What are your command line options?
Thanks,
Viet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Viet,
I am just using "-std=c++14". I can also reproduce this using godbolt: https://godbolt.org/g/p7Y8Tz
Best,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does GNU compiler gives you a warning as well?
Thanks,
Viet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
gcc generates the expected deprecation warning from version 4.9.0 on and clang from version 3.3 on.
Best,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can suppress it by -wd2651.
Thanks,
Viet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of course, I can suppress it with -wd2651. That was never the question. It should just not have appeared in the first place. This is why I labeled the topic "bug report".
Best,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, has there been any progress or is the suppression still the only viable choice?

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