Menu

Leading underscore in function names i C

2021-10-12
2021-10-12
  • Phil Wiggum

    Phil Wiggum - 2021-10-12

    Hi!

    In 'C' I can't find any of my functions starting with a leading underscore.
    Is this a config issue?
    Or if it is excluded by default, can I find where in the source this is done?
    Some one mentioned that leading underscore is reserved for 'C' but I do need them to be included.

    /Thanks
    Phil

     
  • Phil Wiggum

    Phil Wiggum - 2021-10-12

    I found why my leading underscore function are not included.
    They are normally included but in this case it boiled down to my functions are located in a included file and is not scanned.

    example.c:
    ....
    #include "example.c_a"
    ....
    
    example.c_a:
    ....
    static void _leading_underscore_function( void )
    {
    }
    ....
    

    How can I include 'example.c_a' in the scanning.
    I see the file 'example.c_a' but nothing is scanned.

    /Phil

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.