[Bug c/47438] function arguments memory alignment problem.

hp at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 2 03:25:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47438

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hp at gcc dot gnu.org

--- Comment #5 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-02-02 03:25:44 UTC ---
(In reply to comment #4)
> Would u please try again ?

I tried on my aging Fedora 12 installation (gcc-4.4.3-something) and somewhat
surprisingly the code compiled (outputting different numbers as expected), but
you'll see sufficient warnings with the options "-W -Wall" to put you on track.

You can't expect calls to different functions (different parameter types) to
behave the same like that, certainly not when passing the wrong number of
parameters as well as using parameters that "wasn't passed"!  An undefined
value is used, which is about as undefined as the one in the other function,
just not read as the same value.  Really, you can't even expect tranNo (the
first and single parameter actually passed) to be read as the same value when
you call functions that way (or any undefined way).
If you want to report a bug related to alignment of passed parameters, would
you please try again?  Start with real code from your application, make sure it
compiles without related warnings, open a new but report.



More information about the Gcc-bugs mailing list