Skip to main content
modify code to fix error introduced by previous edit.
Source Link
bames53
  • 88.7k
  • 15
  • 191
  • 255

In GCC you can declare your function with the attribute deprecated like this:

void myfunc() \_\_attribute\_\___attribute__ ((deprecated)); 

This will trigger a compile-time warning when that function is used in a .c file.

You can find more info under "Diagnostic pragmas" at http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html

In GCC you can declare your function with the attribute deprecated like this:

void myfunc() \_\_attribute\_\_ ((deprecated)); 

This will trigger a compile-time warning when that function is used in a .c file.

You can find more info under "Diagnostic pragmas" at http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html

In GCC you can declare your function with the attribute deprecated like this:

void myfunc() __attribute__ ((deprecated)); 

This will trigger a compile-time warning when that function is used in a .c file.

You can find more info under "Diagnostic pragmas" at http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html

added 4 characters in body
Source Link
gliderkite
  • 8.9k
  • 7
  • 49
  • 82

In GCC you can declare your function with the attribute deprecated like this:

void myfunc() __attribute__ ((deprecated));

void myfunc() \_\_attribute\_\_ ((deprecated)); 

This will trigger a compile-time warning when that function is used in a .c file.

You can find more info under "Diagnostic pragmas" at http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html

In GCC you can declare your function with the attribute deprecated like this:

void myfunc() __attribute__ ((deprecated));

This will trigger a compile-time warning when that function is used in a .c file.

You can find more info under "Diagnostic pragmas" at http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html

In GCC you can declare your function with the attribute deprecated like this:

void myfunc() \_\_attribute\_\_ ((deprecated)); 

This will trigger a compile-time warning when that function is used in a .c file.

You can find more info under "Diagnostic pragmas" at http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html

Source Link
Terje Mikal
  • 947
  • 6
  • 17

In GCC you can declare your function with the attribute deprecated like this:

void myfunc() __attribute__ ((deprecated));

This will trigger a compile-time warning when that function is used in a .c file.

You can find more info under "Diagnostic pragmas" at http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html