Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Narrowing conversion from unsigned long to signed long #787

Open
jrprice opened this issue May 20, 2020 · 2 comments
Open

Narrowing conversion from unsigned long to signed long #787

jrprice opened this issue May 20, 2020 · 2 comments

Comments

@jrprice
Copy link
Contributor

jrprice commented May 20, 2020

Enabling -Werror produces this:

../test_common/harness/conversions.cpp:211:14: error: narrowing conversion of ‘18446744071562067968’ from ‘long long unsigned int’ to ‘Long’ {aka ‘long int’} [-Wnarrowing]
  211 |         0, 0 };    // Last two values aren't stored here

This will be disabled in the root CMakeLists.txt file until fixed.

@ellnor01
Copy link
Contributor

ellnor01 commented Feb 2, 2021

This error has been fixed under #901
However reenabling the error has uncovered many other narrowing conversion failures.
I will create a couple of patches to move the -Wno-narrowing flag down to specific suites with loads of issues, fixing some individual errors on the way. Then create new issues to remove the flag from the remaining suites.

ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 3, 2021
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to test_conformance CMakeLists.txt where
there are many more build errors revealed from this fix

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 5, 2021
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to test_conformance CMakeLists.txt where
there are many more build errors revealed from this fix

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 5, 2021
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 5, 2021
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 9, 2021
Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 9, 2021
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 10, 2021
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 10, 2021
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 10, 2021
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 10, 2021
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 10, 2021
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Feb 12, 2021
Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
@ellnor01
Copy link
Contributor

Under #1144 -Wno-narrowing flag is being moved down to individual directories which contain lots of occurrences. I have raised new issues to solve each of these: #1156 #1157 #1158 #1159. Closing #1144 should now be enough to close this issue.

ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Apr 28, 2021
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to test_conformance CMakeLists.txt where
there are many more build errors revealed from this fix

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Apr 28, 2021
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Apr 28, 2021
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ellnor01 added a commit to ellnor01/OpenCL-CTS that referenced this issue Apr 28, 2021
Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
StuartDBrady pushed a commit to StuartDBrady/OpenCL-CTS that referenced this issue Nov 9, 2021
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to test_conformance CMakeLists.txt where
there are many more build errors revealed from this fix

Contributes KhronosGroup#787

Change-Id: I2fade305dc6a32a0cb9816e85c37cbf10a5157d5
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jun 19, 2024
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to test_conformance CMakeLists.txt where
there are many more build errors revealed from this fix

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jun 19, 2024
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jun 19, 2024
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jun 19, 2024
Contributes KhronosGroup#787

Change-Id: If5f6b250273ab96f26832c7d4453ea79801107e3
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to test_conformance CMakeLists.txt where
there are many more build errors revealed from this fix

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Contributes KhronosGroup#787

Change-Id: If5f6b250273ab96f26832c7d4453ea79801107e3
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to test_conformance CMakeLists.txt where
there are many more build errors revealed from this fix

Contributes KhronosGroup#787

Change-Id: If64e28b98efea9c1a64efdad809502359da75ea0
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Change-Id: I7cd4d564ebf487403c2771683d2063ca34941c9b
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Contributes KhronosGroup#787

Change-Id: If5f6b250273ab96f26832c7d4453ea79801107e3
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to test_conformance CMakeLists.txt where
there are many more build errors revealed from this fix

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 7, 2024
Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 9, 2024
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 9, 2024
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Jul 9, 2024
Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Sep 22, 2024
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to test_conformance CMakeLists.txt where
there are many more build errors revealed from this fix

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Sep 22, 2024
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Sep 22, 2024
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Sep 22, 2024
Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Sep 22, 2024
Moves -Wno-narrowing down to only run on suites with
many narrowing errors.

Includes some quick fixes for one-off errors this caused.

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Sep 22, 2024
Includes fix for MacOS build error

Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
ahesham-arm pushed a commit to ellnor01/OpenCL-CTS that referenced this issue Sep 22, 2024
Contributes KhronosGroup#787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants