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

quadEM-R9-4 Fails to build with GCCversion 11.1.1 20210531 #21

Open
michel4j opened this issue Jul 26, 2021 · 0 comments
Open

quadEM-R9-4 Fails to build with GCCversion 11.1.1 20210531 #21

michel4j opened this issue Jul 26, 2021 · 0 comments

Comments

@michel4j
Copy link

drvTetrAMM.cpp fails to compile with the following error:

/usr/bin/g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE          -D_X86_64_ -DUNIX  -Dlinux      -O3   -Wall      -mtune=generic     -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include      -I/home/michel/Applications/epics/synApps/support/quadEM-R9-4/include   -I/home/michel/Applications/epics/synApps/support/ipac-2-16/include         -I/home/michel/Applications/epics/synApps/support/asyn-R4-42/include  -I/home/michel/Applications/epics/synApps/support/areaDetector-R3-11/ADSupport/include/os/Linux -I/home/michel/Applications/epics/synApps/support/areaDetector-R3-11/ADSupport/include   -I/home/michel/Applications/epics/synApps/support/areaDetector-R3-11/ADCore/include  -I/home/michel/Applications/epics/synApps/support/autosave-R5-10-2/include/os/Linux -I/home/michel/Applications/epics/synApps/support/autosave-R5-10-2/include   -I/home/michel/Applications/epics/synApps/support/busy-R1-7-3/include   -I/home/michel/Applications/epics/synApps/support/calc-R3-7-4/include   -I/home/michel/Applications/epics/synApps/support/seq-2-2-9/include   -I/home/michel/Applications/epics/synApps/support/sscan-R2-11-4/include  -I/home/michel/Applications/epics/synApps/support/iocStats-3-1-16/include/os/Linux -I/home/michel/Applications/epics/synApps/support/iocStats-3-1-16/include -I/home/michel/Applications/epics/base-7.0.4.1/include/compiler/gcc -I/home/michel/Applications/epics/base-7.0.4.1/include/os/Linux -I/home/michel/Applications/epics/base-7.0.4.1/include        -c ../drvTetrAMM.cpp
../drvTetrAMM.cpp: In member function ‘void drvTetrAMM::readThread()’:
../drvTetrAMM.cpp:268:22: error: narrowing conversion of ‘18443366386873925631’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]
  268 |                 case 0xfff40002ffffffffll:
      |                      ^~~~~~~~~~~~~~~~~~~~
../drvTetrAMM.cpp:273:22: error: narrowing conversion of ‘18443366378283991039’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]
  273 |                 case 0xfff40000ffffffffll:
      |                      ^~~~~~~~~~~~~~~~~~~~
../drvTetrAMM.cpp:283:22: error: narrowing conversion of ‘18443366382578958335’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]
  283 |                 case 0xfff40001ffffffffll:
      |                      ^~~~~~~~~~~~~~~~~~~~
../drvTetrAMM.cpp:296:22: error: narrowing conversion of ‘18443366391168892927’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]
  296 |                 case 0xfff40003ffffffffll:
      |                      ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [/home/michel/Applications/epics/base-7.0.4.1/configure/RULES_BUILD:249: drvTetrAMM.o] Error 1

This can be fixed by declaring lastValue as unsigned long long lastValue on line 193 instead of long long lastValue. Not sure what the impact of this change is elsewhere but it compiles without error after that.

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

1 participant