Page MenuHomePhabricator

[C++4OpenCL] Enable -cl-std flag clc++21 as a shorthand for clc++2021
Needs RevisionPublic

Authored by Topotuna on Aug 16 2021, 3:08 AM.

Details

Reviewers
Anastasia
Summary

Allows clc++21 and CLC++21 to be used as possible options for
-cl-std in command line to represent C++ for OpenCL version 2021.

Diff Detail

Event Timeline

Topotuna created this revision.Aug 16 2021, 3:08 AM
Topotuna requested review of this revision.Aug 16 2021, 3:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2021, 3:08 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

@svenvh I would like to discuss it further with Sven whether it is a good direction or not?

@svenvh I would like to discuss it further with Sven whether it is a good direction or not?

The underlying motivation for adding those aliases seems to be missing from the description.

Personally, I do not see the point of adding aliases to save two characters (you only save the "20" part of "clc++2021"), while adding potential confusion ("is the language called C++ for OpenCL 2021 or C++ for OpenCL 21, or maybe it has something to do with OpenCL 2.1?"). Also they are being added as deprecated aliases, suggesting they might be removed at some point in the future again?

I'd much rather see one canonical way of specifying the language version, instead of adding multiple aliases to do the same thing. But perhaps there is a good reason that I am not aware of?

Anastasia requested changes to this revision.Aug 18 2021, 4:26 AM

@svenvh I would like to discuss it further with Sven whether it is a good direction or not?

The underlying motivation for adding those aliases seems to be missing from the description.

Personally, I do not see the point of adding aliases to save two characters (you only save the "20" part of "clc++2021"), while adding potential confusion ("is the language called C++ for OpenCL 2021 or C++ for OpenCL 21, or maybe it has something to do with OpenCL 2.1?"). Also they are being added as deprecated aliases, suggesting they might be removed at some point in the future again?

I'd much rather see one canonical way of specifying the language version, instead of adding multiple aliases to do the same thing. But perhaps there is a good reason that I am not aware of?

The main motivation for this was just a shorter spelling. Ok, it seems like there is some trade off... so let's hold off this change for now until we either get more input that shows some clear benefit or shows that there is none and then we can abandon the change.

This revision now requires changes to proceed.Aug 18 2021, 4:26 AM