Thread
:
GCC bug or am I doing something wrong?
View Single Post
pichlo
2014-06-12 , 07:35
Posts: 6,450 | Thanked: 20,983 times | Joined on Sep 2012 @ UK
#
4
Hmm, haven't tried varying the optimization level, a good point. But I have seen an assembly output of various C and C++ programs (not this one yet though) and there often was a few bytes of padding with NOPs before or after the final RET from the subroutine.
Copernicus, FREQUENCY and PERIOD are enums with values 0 and 1, respectively. You are right, there are only those two values so I could have used an if instead of a switch but I think the latter communicates the intention more clearly.
FWIW. the code has been completely refactored since last night and no longer exhibits the problem.
Quote & Reply
|
The Following 2 Users Say Thank You to pichlo For This Useful Post:
backcover_press_service
,
Copernicus
pichlo
View Public Profile
Send a private message to pichlo
Find all posts by pichlo