diff options
author | Frederik Harwath <frederik@codesourcery.com> | 2019-12-03 14:38:54 +0000 |
---|---|---|
committer | Frederik Harwath <frederik@gcc.gnu.org> | 2019-12-03 14:38:54 +0000 |
commit | d8f0024b57e261f0466b2b206d459ad05ab7ca1c (patch) | |
tree | bd804418fd3de6af0c1bbb21d7bcc8f1344927bd /gcc/c-family/c-cppbuiltin.c | |
parent | 83caa34e2a618842e05f59cbb3e2dda93dc23270 (diff) | |
download | gcc-d8f0024b57e261f0466b2b206d459ad05ab7ca1c.zip gcc-d8f0024b57e261f0466b2b206d459ad05ab7ca1c.tar.gz gcc-d8f0024b57e261f0466b2b206d459ad05ab7ca1c.tar.bz2 |
Validate acc_device_t uses
Check that function arguments of type acc_device_t
are valid enumeration values in all publicly visible
functions from oacc-init.c.
2019-12-03 Frederik Harwath <frederik@codesourcery.com>
libgomp/
* oacc-init.c (acc_known_device_type): Add function.
(unknown_device_type_error): Add function.
(name_of_acc_device_t): Change to call unknown_device_type_error
on unknown type.
(resolve_device): Use acc_known_device_type.
(acc_init): Fail if acc_device_t argument is not valid.
(acc_shutdown): Likewise.
(acc_get_num_devices): Likewise.
(acc_set_device_type): Likewise.
(acc_get_device_num): Likewise.
(acc_set_device_num): Likewise.
(acc_on_device): Add comment that argument validity is not checked.
Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r278937
Diffstat (limited to 'gcc/c-family/c-cppbuiltin.c')
0 files changed, 0 insertions, 0 deletions