#1792 Inline functions with more than 1 parameter breaks build

closed-rejected
5
2013-05-25
2011-05-18
No

I upgraded from 2.9.0 to the May 17, 2011 snapshot (#6522), and it looks like inline functions with more than one parameter are causing the linker issues. If you run make all on the code included with 2.9.0, then the code will compile just fine. However, on #6522, you get the following error:

?ASlink-Warning-Undefined Global '_test_2_params_PARM_2' referenced by module 'main'
make: *** [all] Error 1

If you comment out the line in main.c where test_2_params() is called, you get no error in either version. It seems like somehow, inlining with two parameters has gotten broken.

Discussion

  • Brennen Ball

    Brennen Ball - 2011-05-18

    test files

     
  • Brennen Ball

    Brennen Ball - 2011-05-18
    • summary: Inline functions with more than 1 parameters breaks bulid --> Inline functions with more than 1 parameter breaks bulid
     
  • Maarten Brock

    Maarten Brock - 2011-05-19

    This is no bug. When compiling main.c the compiler never gets to see a definition of these two functions and thus can not inline them. Therefor it needs a definition with external linkage but there is none because in test.c they are marked static.

     
  • Maarten Brock

    Maarten Brock - 2011-05-19
    • milestone: --> non_bugs
    • assigned_to: nobody --> maartenbrock
    • summary: Inline functions with more than 1 parameter breaks bulid --> Inline functions with more than 1 parameter breaks build
    • status: open --> closed-rejected
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks