Configuration

Global Settings

  1. -call_properties

    1. As configured, ECLAIR will:

      1. Consider a call to a function with a declaration whose unqualified name is `z_phys_map' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(z_phys_map)", {"pointee_read(1=never)","pointee_write(1=always)","taken()"}}
      2. Consider a call to a function with a declaration whose unqualified name is `z_phys_map' as having argument pointee with index 1 with non-const type always written before return.

        -call_properties+={"name(z_phys_map)", {"pointee_read(1=never)","pointee_write(1=always)","taken()"}}
      3. Consider a call to a function with a declaration whose unqualified name is `z_phys_map' as possibly taking any address arguments.

        -call_properties+={"name(z_phys_map)", {"pointee_read(1=never)","pointee_write(1=always)","taken()"}}
      4. Consider a call to a function with a declaration whose unqualified name is `pcie_get_mbar' as having argument pointee with index 3 with non-const type never read before being written.

        -call_properties+={"name(pcie_get_mbar)", {"pointee_read(3=never)","pointee_write(3=maybe)","taken()"}}
      5. Consider a call to a function with a declaration whose unqualified name is `pcie_get_mbar' as having argument pointee with index 3 with non-const type may be written before return.

        -call_properties+={"name(pcie_get_mbar)", {"pointee_read(3=never)","pointee_write(3=maybe)","taken()"}}
      6. Consider a call to a function with a declaration whose unqualified name is `pcie_get_mbar' as possibly taking any address arguments.

        -call_properties+={"name(pcie_get_mbar)", {"pointee_read(3=never)","pointee_write(3=maybe)","taken()"}}
      7. Consider a call to a function with a declaration whose unqualified name is `k_mem_region_align' as having argument pointee with indices between 1 and 2 with non-const type never read before being written.

        -call_properties+={"name(k_mem_region_align)", {
          	"pointee_read(1..2=never)",
        	"pointee_write(1..2=always)","taken()"
           	}}
      8. Consider a call to a function with a declaration whose unqualified name is `k_mem_region_align' as having argument pointee with indices between 1 and 2 with non-const type always written before return.

        -call_properties+={"name(k_mem_region_align)", {
          	"pointee_read(1..2=never)",
        	"pointee_write(1..2=always)","taken()"
           	}}
      9. Consider a call to a function with a declaration whose unqualified name is `k_mem_region_align' as possibly taking any address arguments.

        -call_properties+={"name(k_mem_region_align)", {
          	"pointee_read(1..2=never)",
        	"pointee_write(1..2=always)","taken()"
           	}}
      10. Consider a call to a function with a declaration whose unqualified name is `pentry_get' as having argument pointee with indices between 1 and 2 with non-const type never and argument pointee with indices between 3 and 4 with non-const type always read before being written.

        -call_properties+={"name(pentry_get)", {
            	"pointee_read(1..2=never&&3..4=always)",
        		"pointee_write(1..2=maybe&&3..4=never)"
            	}}
      11. Consider a call to a function with a declaration whose unqualified name is `pentry_get' as having argument pointee with indices between 1 and 2 with non-const type may be and argument pointee with indices between 3 and 4 with non-const type never written before return.

        -call_properties+={"name(pentry_get)", {
            	"pointee_read(1..2=never&&3..4=always)",
        		"pointee_write(1..2=maybe&&3..4=never)"
            	}}
      12. Consider a call to a function with a declaration whose unqualified name is `z_phys_unmap' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(z_phys_unmap)", {"pointee_read(1=never)","pointee_write(1=never)"}}
      13. Consider a call to a function with a declaration whose unqualified name is `z_phys_unmap' as having argument pointee with index 1 with non-const type never written before return.

        -call_properties+={"name(z_phys_unmap)", {"pointee_read(1=never)","pointee_write(1=never)"}}
      14. Consider a call to a function with a declaration whose unqualified name is `check_sum' as having argument pointee with index 1 with non-const type always read before being written.

        -call_properties+={"name(check_sum)", {"pointee_read(1=always)","pointee_write(1=never)"}}
      15. Consider a call to a function with a declaration whose unqualified name is `check_sum' as having argument pointee with index 1 with non-const type never written before return.

        -call_properties+={"name(check_sum)", {"pointee_read(1=always)","pointee_write(1=never)"}}
      16. Consider a call to a function with a declaration whose unqualified name is `z_impl_device_get_binding' as having argument pointee with index 1 with non-const type may be read before being written.

        -call_properties+={"name(z_impl_device_get_binding)", {"pointee_read(1=maybe)","pointee_write(1=maybe)","taken()"}}
      17. Consider a call to a function with a declaration whose unqualified name is `z_impl_device_get_binding' as having argument pointee with index 1 with non-const type may be written before return.

        -call_properties+={"name(z_impl_device_get_binding)", {"pointee_read(1=maybe)","pointee_write(1=maybe)","taken()"}}
      18. Consider a call to a function with a declaration whose unqualified name is `z_impl_device_get_binding' as possibly taking any address arguments.

        -call_properties+={"name(z_impl_device_get_binding)", {"pointee_read(1=maybe)","pointee_write(1=maybe)","taken()"}}
      19. Consider a call to a function with a declaration whose unqualified name is `z_setup_new_thread' as having argument pointee with index 10 with non-const type may be read before being written.

        -call_properties+={"name(z_setup_new_thread)", {"pointee_read(10=maybe)","pointee_write(10=never)","taken()"}}
      20. Consider a call to a function with a declaration whose unqualified name is `z_setup_new_thread' as having argument pointee with index 10 with non-const type never written before return.

        -call_properties+={"name(z_setup_new_thread)", {"pointee_read(10=maybe)","pointee_write(10=never)","taken()"}}
      21. Consider a call to a function with a declaration whose unqualified name is `z_setup_new_thread' as possibly taking any address arguments.

        -call_properties+={"name(z_setup_new_thread)", {"pointee_read(10=maybe)","pointee_write(10=never)","taken()"}}
      22. Consider a call to a function with a declaration whose unqualified name is `mbox_message_put' as having argument pointee with index 3 with non-const type always read before being written.

        -call_properties+={"name(mbox_message_put)", {"pointee_read(3=always)","pointee_write(3=always)"}}
      23. Consider a call to a function with a declaration whose unqualified name is `mbox_message_put' as having argument pointee with index 3 with non-const type always written before return.

        -call_properties+={"name(mbox_message_put)", {"pointee_read(3=always)","pointee_write(3=always)"}}
    2. The functions can be implemented using the GCC built-in functions. See Section "6.62.13 6.56 Built-in Functions to Perform Arithmetic with Overflow Checking" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf.

      As configured, ECLAIR will:

      1. Consider a call to a function with a declaration whose unqualified name is `size_mul_overflow' as having argument pointee with index 3 with non-const type never read before being written.

        -call_properties+={"name(size_mul_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      2. Consider a call to a function with a declaration whose unqualified name is `size_mul_overflow' as having argument pointee with index 3 with non-const type always written before return.

        -call_properties+={"name(size_mul_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      3. Consider a call to a function with a declaration whose unqualified name is `size_mul_overflow' as possibly taking any address arguments.

        -call_properties+={"name(size_mul_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      4. Consider a call to a function with a declaration whose unqualified name is `size_add_overflow' as having argument pointee with index 3 with non-const type never read before being written.

        -call_properties+={"name(size_add_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      5. Consider a call to a function with a declaration whose unqualified name is `size_add_overflow' as having argument pointee with index 3 with non-const type always written before return.

        -call_properties+={"name(size_add_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      6. Consider a call to a function with a declaration whose unqualified name is `size_add_overflow' as possibly taking any address arguments.

        -call_properties+={"name(size_add_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      7. Consider a call to a function with a declaration whose unqualified name is `__builtin_mul_overflow' as having argument pointee with index 3 with non-const type never read before being written.

        -call_properties+={"name(__builtin_mul_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      8. Consider a call to a function with a declaration whose unqualified name is `__builtin_mul_overflow' as having argument pointee with index 3 with non-const type always written before return.

        -call_properties+={"name(__builtin_mul_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      9. Consider a call to a function with a declaration whose unqualified name is `__builtin_mul_overflow' as possibly taking any address arguments.

        -call_properties+={"name(__builtin_mul_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      10. Consider a call to a function with a declaration whose unqualified name is `__builtin_add_overflow' as having argument pointee with index 3 with non-const type never read before being written.

        -call_properties+={"name(__builtin_add_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      11. Consider a call to a function with a declaration whose unqualified name is `__builtin_add_overflow' as having argument pointee with index 3 with non-const type always written before return.

        -call_properties+={"name(__builtin_add_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
      12. Consider a call to a function with a declaration whose unqualified name is `__builtin_add_overflow' as possibly taking any address arguments.

        -call_properties+={"name(__builtin_add_overflow)", {"pointee_read(3=never)","pointee_write(3=always)","taken()"}}
    3. As configured, ECLAIR will:

      1. Consider a call to a function with a declaration whose unqualified name is `__builtin_va_end' as possibly taking any address arguments.

        -call_properties+={"name(__builtin_va_end)", {"taken()"}}
      2. Consider a call to a function with a declaration whose unqualified name is `arch_page_phys_get' as having argument pointee with index 2 with non-const type never read before being written.

        -call_properties+={"name(arch_page_phys_get)", {"pointee_read(2=never)","pointee_write(2=maybe)","taken()"}}
      3. Consider a call to a function with a declaration whose unqualified name is `arch_page_phys_get' as having argument pointee with index 2 with non-const type may be written before return.

        -call_properties+={"name(arch_page_phys_get)", {"pointee_read(2=never)","pointee_write(2=maybe)","taken()"}}
      4. Consider a call to a function with a declaration whose unqualified name is `arch_page_phys_get' as possibly taking any address arguments.

        -call_properties+={"name(arch_page_phys_get)", {"pointee_read(2=never)","pointee_write(2=maybe)","taken()"}}
      5. Consider a call to a function with a declaration whose unqualified name is `cbvprintf' as possibly taking any address arguments.

        -call_properties+={"name(cbvprintf)", {"taken()"}}
      6. Consider a call to a function with a declaration whose unqualified name is `cbvprintf' as possibly taking any address arguments.

        -call_properties+={"name(cbvprintf)", {"taken()"}}
      7. Consider a call to a function with a declaration whose unqualified name is `char2hex' as having argument pointee with index 2 with non-const type never read before being written.

        -call_properties+={"name(char2hex)", {"pointee_read(2=never)","pointee_write(2=maybe)"}}
      8. Consider a call to a function with a declaration whose unqualified name is `char2hex' as having argument pointee with index 2 with non-const type may be written before return.

        -call_properties+={"name(char2hex)", {"pointee_read(2=never)","pointee_write(2=maybe)"}}
      9. Consider a call to a function with a declaration whose unqualified name is `find_and_stack' as having argument pointee with index 3 with non-const type never read before being written.

        -call_properties+={"name(find_and_stack)", {"pointee_read(3=never)","pointee_write(3=always)"}}
      10. Consider a call to a function with a declaration whose unqualified name is `find_and_stack' as having argument pointee with index 3 with non-const type always written before return.

        -call_properties+={"name(find_and_stack)", {"pointee_read(3=never)","pointee_write(3=always)"}}
      11. Consider a call to a function with a declaration whose unqualified name is `fix_missing_black' as having argument pointee with index 1 with non-const type always read before being written.

        -call_properties+={"name(fix_missing_black)", {"pointee_read(1=always)","pointee_write(1=maybe)"}}
      12. Consider a call to a function with a declaration whose unqualified name is `fix_missing_black' as having argument pointee with index 1 with non-const type may be written before return.

        -call_properties+={"name(fix_missing_black)", {"pointee_read(1=always)","pointee_write(1=maybe)"}}
      13. Consider a call to a function with a declaration whose unqualified name is `__get_cpuid' as having argument pointee with indices between 2 and 5 with non-const type never read before being written.

        -call_properties+={"name(__get_cpuid)", {"pointee_read(2..5=never)","pointee_write(2..5=always)"}}
      14. Consider a call to a function with a declaration whose unqualified name is `__get_cpuid' as having argument pointee with indices between 2 and 5 with non-const type always written before return.

        -call_properties+={"name(__get_cpuid)", {"pointee_read(2..5=never)","pointee_write(2..5=always)"}}
      15. Consider a call to a function with a declaration whose unqualified name is `k_mutex_init' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(k_mutex_init)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      16. Consider a call to a function with a declaration whose unqualified name is `k_mutex_init' as having argument pointee with index 1 with non-const type always written before return.

        -call_properties+={"name(k_mutex_init)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      17. Consider a call to a function with a declaration whose unqualified name is `k_sem_init' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(k_sem_init)", {"pointee_read(1=never)","pointee_write(1=maybe)"}}
      18. Consider a call to a function with a declaration whose unqualified name is `k_sem_init' as having argument pointee with index 1 with non-const type may be written before return.

        -call_properties+={"name(k_sem_init)", {"pointee_read(1=never)","pointee_write(1=maybe)"}}
      19. Consider a call to a function with a declaration whose unqualified name is `k_work_init' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(k_work_init)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      20. Consider a call to a function with a declaration whose unqualified name is `k_work_init' as having argument pointee with index 1 with non-const type always written before return.

        -call_properties+={"name(k_work_init)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      21. Consider a call to a function with a declaration whose unqualified name is `k_work_init_delayable' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(k_work_init_delayable)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      22. Consider a call to a function with a declaration whose unqualified name is `k_work_init_delayable' as having argument pointee with index 1 with non-const type always written before return.

        -call_properties+={"name(k_work_init_delayable)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      23. Consider a call to a function with a declaration whose unqualified name is `k_work_queue_start' as possibly taking any address arguments.

        -call_properties+={"name(k_work_queue_start)", {"taken()"}}
      24. Consider a call to a function with a declaration whose unqualified name is `log_from_user' as having argument pointee with index 1 or more with non-const type never written before return.

        -call_properties+={"name(log_from_user)", {"pointee_write(1..=never)", "taken()"}}
      25. Consider a call to a function with a declaration whose unqualified name is `log_from_user' as possibly taking any address arguments.

        -call_properties+={"name(log_from_user)", {"pointee_write(1..=never)", "taken()"}}
      26. Consider a call to a function with a declaration whose unqualified name is `log_n' as possibly taking any address arguments.

        -call_properties+={"name(log_n)", {"taken()"}}
      27. Consider a call to a function with a declaration whose unqualified name is `log_string_sync' as having argument pointee with index 1 or more with non-const type never written before return.

        -call_properties+={"name(log_string_sync)", {"pointee_write(1..=never)", "taken()"}}
      28. Consider a call to a function with a declaration whose unqualified name is `log_string_sync' as possibly taking any address arguments.

        -call_properties+={"name(log_string_sync)", {"pointee_write(1..=never)", "taken()"}}
      29. Consider a call to a function with a declaration whose unqualified name is `match_region' as having argument pointee with indices between 5 and 6 with non-const type never read before being written.

        -call_properties+={"name(match_region)", {"pointee_read(5..6=never)","pointee_write(5=always&&6=maybe)"}}
      30. Consider a call to a function with a declaration whose unqualified name is `match_region' as having argument pointee with index 5 with non-const type always and argument pointee with index 6 with non-const type may be written before return.

        -call_properties+={"name(match_region)", {"pointee_read(5..6=never)","pointee_write(5=always&&6=maybe)"}}
      31. Consider a call to a function with a declaration whose unqualified name is `mbox_async_alloc' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(mbox_async_alloc)", {"pointee_read(1=never)","pointee_write(1=maybe)"}}
      32. Consider a call to a function with a declaration whose unqualified name is `mbox_async_alloc' as having argument pointee with index 1 with non-const type may be written before return.

        -call_properties+={"name(mbox_async_alloc)", {"pointee_read(1=never)","pointee_write(1=maybe)"}}
      33. Consider a call to a function with a declaration whose unqualified name is `pipe_xfer_prepare' as having argument pointee with index 2 with non-const type never read before being written.

        -call_properties+={"name(pipe_xfer_prepare)", {"pointee_read(2=never)","pointee_write(2=always)"}}
      34. Consider a call to a function with a declaration whose unqualified name is `pipe_xfer_prepare' as having argument pointee with index 2 with non-const type always written before return.

        -call_properties+={"name(pipe_xfer_prepare)", {"pointee_read(2=never)","pointee_write(2=always)"}}
      35. Consider a call to a function with a declaration whose unqualified name is `printk' as having argument pointee with index 1 or more with non-const type never written before return.

        -call_properties+={"name(printk)", {"pointee_write(1..=never)", "taken()"}}
      36. Consider a call to a function with a declaration whose unqualified name is `printk' as possibly taking any address arguments.

        -call_properties+={"name(printk)", {"pointee_write(1..=never)", "taken()"}}
      37. Consider a call to a function with a declaration whose unqualified name is `snprintk' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(snprintk)", {"pointee_read(1=never)","pointee_write(1=always)", "taken()"}}
      38. Consider a call to a function with a declaration whose unqualified name is `snprintk' as having argument pointee with index 1 with non-const type always written before return.

        -call_properties+={"name(snprintk)", {"pointee_read(1=never)","pointee_write(1=always)", "taken()"}}
      39. Consider a call to a function with a declaration whose unqualified name is `snprintk' as possibly taking any address arguments.

        -call_properties+={"name(snprintk)", {"pointee_read(1=never)","pointee_write(1=always)", "taken()"}}
      40. Consider a call to a function with a declaration whose unqualified name is `snprintk' as possibly taking any address arguments.

        -call_properties+={"name(snprintk)", {"taken()"}}
      41. Consider a call to a function with a declaration whose unqualified name is `sys_bitarray_alloc' as having argument pointee with index 3 with non-const type never read before being written.

        -call_properties+={"name(sys_bitarray_alloc)", {"pointee_read(3=never)","pointee_write(3=maybe)","taken()"}}
      42. Consider a call to a function with a declaration whose unqualified name is `sys_bitarray_alloc' as having argument pointee with index 3 with non-const type may be written before return.

        -call_properties+={"name(sys_bitarray_alloc)", {"pointee_read(3=never)","pointee_write(3=maybe)","taken()"}}
      43. Consider a call to a function with a declaration whose unqualified name is `sys_bitarray_alloc' as possibly taking any address arguments.

        -call_properties+={"name(sys_bitarray_alloc)", {"pointee_read(3=never)","pointee_write(3=maybe)","taken()"}}
      44. Consider a call to a function with a declaration whose unqualified name is `sys_slist_init' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(sys_slist_init)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      45. Consider a call to a function with a declaration whose unqualified name is `sys_slist_init' as having argument pointee with index 1 with non-const type always written before return.

        -call_properties+={"name(sys_slist_init)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      46. Consider a call to a function with a declaration whose unqualified name is `vprintk' as possibly taking any address arguments.

        -call_properties+={"name(vprintk)", {"taken()"}}
      47. Consider a call to a function with a declaration whose unqualified name is `z_dummy_thread_init' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(z_dummy_thread_init)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      48. Consider a call to a function with a declaration whose unqualified name is `z_dummy_thread_init' as having argument pointee with index 1 with non-const type always written before return.

        -call_properties+={"name(z_dummy_thread_init)", {"pointee_read(1=never)","pointee_write(1=always)"}}
      49. Consider a call to a function with a declaration whose unqualified name is `z_impl_k_stack_pop' as possibly taking any address arguments.

        -call_properties+={"name(z_impl_k_stack_pop)", {"taken()"}}
      50. Consider a call to a function with a declaration whose unqualified name is `z_impl_z_log_msg2_runtime_vcreate' as possibly taking any address arguments.

        -call_properties+={"name(z_impl_z_log_msg2_runtime_vcreate)", {"taken()"}}
      51. Consider a call to a function with a declaration whose unqualified name is `z_log_minimal_printk' as having argument pointee with index 1 or more with non-const type never written before return.

        -call_properties+={"name(z_log_minimal_printk)", {"pointee_write(1..=never)", "taken()"}}
      52. Consider a call to a function with a declaration whose unqualified name is `z_log_minimal_printk' as possibly taking any address arguments.

        -call_properties+={"name(z_log_minimal_printk)", {"pointee_write(1..=never)", "taken()"}}
      53. Consider a call to a function with a declaration whose unqualified name is `z_log_msg2_runtime_create' as having argument pointee with index 1 or more with non-const type never written before return.

        -call_properties+={"name(z_log_msg2_runtime_create)", {"pointee_write(1..=never)", "taken()"}}
      54. Consider a call to a function with a declaration whose unqualified name is `z_log_msg2_runtime_create' as possibly taking any address arguments.

        -call_properties+={"name(z_log_msg2_runtime_create)", {"pointee_write(1..=never)", "taken()"}}
      55. Consider a call to a function with a declaration whose unqualified name is `z_log_printk' as possibly taking any address arguments.

        -call_properties+={"name(z_log_printk)", {"taken()"}}
      56. Consider a call to a function with a declaration whose unqualified name is `z_log_printf_arg_checker' as having argument pointee with index 1 or more with non-const type never written before return.

        -call_properties+={"name(z_log_printf_arg_checker)", {"pointee_write(1..=never)", "taken()"}}
      57. Consider a call to a function with a declaration whose unqualified name is `z_log_printf_arg_checker' as possibly taking any address arguments.

        -call_properties+={"name(z_log_printf_arg_checker)", {"pointee_write(1..=never)", "taken()"}}
      58. Consider a call to a function with a declaration whose unqualified name is `z_log_strdup' as possibly taking any address arguments.

        -call_properties+={"name(z_log_strdup)", {"taken()"}}
      59. Consider a call to a function with a declaration whose unqualified name is `z_rb_foreach_next' as possibly taking any address arguments.

        -call_properties+={"name(z_rb_foreach_next)", {"taken()"}}
      60. Consider a call to a function with a declaration whose unqualified name is `z_user_string_copy' as having argument pointee with index 1 with non-const type never read before being written.

        -call_properties+={"name(z_user_string_copy)", {"pointee_read(1=never)","pointee_write(1=maybe)","taken()"}}
      61. Consider a call to a function with a declaration whose unqualified name is `z_user_string_copy' as having argument pointee with index 1 with non-const type may be written before return.

        -call_properties+={"name(z_user_string_copy)", {"pointee_read(1=never)","pointee_write(1=maybe)","taken()"}}
      62. Consider a call to a function with a declaration whose unqualified name is `z_user_string_copy' as possibly taking any address arguments.

        -call_properties+={"name(z_user_string_copy)", {"pointee_read(1=never)","pointee_write(1=maybe)","taken()"}}
    4. These macros are designed to evaluate to either 0 or 1.

      As configured, ECLAIR will:

      1. Consider a call to a macro whose name is `UTIL_NOT' as having the return value as having boolean-as-integer data kind.

        -call_properties+={"macro(name(UTIL_NOT))",{"data_kind(0=int_bool)"}}
      2. Consider a call to a macro whose name is `IS_ENABLED' as having the return value as having boolean-as-integer data kind.

        -call_properties+={"macro(name(IS_ENABLED))",{"data_kind(0=int_bool)"}}
      3. Consider a call to a function with a declaration whose unqualified name is `isspace' as having the return value as having boolean-as-integer data kind.

        -call_properties+={"decl(name(isspace))",{"data_kind(0=int_bool)"}}
      4. Consider a call to a macro whose name is `isdigit' as having the return value as having boolean-as-integer data kind.

        -call_properties+={"macro(name(isdigit))",{"data_kind(0=int_bool)"}}
      5. Consider a call to a function with a declaration whose unqualified name is `isdigit' as having the return value as having boolean-as-integer data kind.

        -call_properties+={"decl(name(isdigit))",{"data_kind(0=int_bool)"}}
      6. Consider a call to a macro whose name is `isalpha' as having the return value as having boolean-as-integer data kind.

        -call_properties+={"macro(name(isalpha))",{"data_kind(0=int_bool)"}}
      7. Consider a call to a function with a declaration whose unqualified name is `isalpha' as having the return value as having boolean-as-integer data kind.

        -call_properties+={"decl(name(isalpha))",{"data_kind(0=int_bool)"}}
      8. Consider a call to a macro whose name is `isupper' as having the return value as having boolean-as-integer data kind.

        -call_properties+={"macro(name(isupper))",{"data_kind(0=int_bool)"}}
      9. Consider a call to a function with a declaration whose unqualified name is `isupper' as having the return value as having boolean-as-integer data kind.

        -call_properties+={"decl(name(isupper))",{"data_kind(0=int_bool)"}}
    5. __builtin_alloca cannot interfere with other effects.

      As configured, ECLAIR will:

      1. Consider a call to a function with a declaration whose unqualified name is `__builtin_alloca' as having no side effects.

        -call_properties+={"decl(name(__builtin_alloca))",{"noeffect"}}
    6. log_strdup cannot interfere with other effects.

      As configured, ECLAIR will:

      1. Consider a call to a function with a declaration whose unqualified name is `log_strdup' as having no side effects.

        -call_properties+={"decl(name(log_strdup))",{"noeffect"}}
  2. -extra_definitions

    1. The following entities are defined in assembly files

      As configured, ECLAIR will:

      1. Assume that an entity whose unqualified name is `x86_ap_start' is defined.

        -extra_definitions+="name(x86_ap_start)"
      2. Assume that an entity whose name matches the regex `^z_x86_(exception|nmi|trampoline)_stack[1-3]?$' is defined.

        -extra_definitions+="^z_x86_(exception|nmi|trampoline)_stack[1-3]?$"
      3. Assume that an entity whose unqualified name is `x86_sse_init' is defined.

        -extra_definitions+="name(x86_sse_init)"
      4. Assume that an entity whose unqualified name is `z_x86_kernel_ptables' is defined.

        -extra_definitions+="name(z_x86_kernel_ptables)"
      5. Assume that an entity whose unqualified name is `z_x86_switch' is defined.

        -extra_definitions+="name(z_x86_switch)"
      6. Assume that an entity whose unqualified name is `z_x86_syscall_entry_stub' is defined.

        -extra_definitions+="name(z_x86_syscall_entry_stub)"
      7. Assume that an entity whose name matches the regex `^(z_x86_user_string_nlen)_(fault_start|fault_end|fixup)\(void\)$' is defined.

        -extra_definitions+="^(z_x86_user_string_nlen)_(fault_start|fault_end|fixup)\\(void\\)$"
      8. Assume that an entity whose unqualified name is `z_x86_userspace_enter' is defined.

        -extra_definitions+="name(z_x86_userspace_enter)"
      9. Assume that an entity whose unqualified name is `arch_user_string_nlen' is defined.

        -extra_definitions+="name(arch_user_string_nlen)"
    2. The following entities are defined from the linker.

      As configured, ECLAIR will:

      1. Assume that an entity whose unqualified name is `_locore_start' is defined.

        -extra_definitions+="name(_locore_start)"
      2. Assume that an entity whose unqualified name is `_locore_end' is defined.

        -extra_definitions+="name(_locore_end)"
      3. Assume that an entity whose unqualified name is `__kernel_ram_start' is defined.

        -extra_definitions+="name(__kernel_ram_start)"
      4. Assume that an entity whose unqualified name is `__kernel_ram_end' is defined.

        -extra_definitions+="name(__kernel_ram_end)"
      5. Assume that an entity whose unqualified name is `__kernel_ram_size' is defined.

        -extra_definitions+="name(__kernel_ram_size)"
      6. Assume that an entity whose unqualified name is `_app_smem_start' is defined.

        -extra_definitions+="name(_app_smem_start)"
      7. Assume that an entity whose unqualified name is `_app_smem_end' is defined.

        -extra_definitions+="name(_app_smem_end)"
      8. Assume that an entity whose unqualified name is `_app_smem_size' is defined.

        -extra_definitions+="name(_app_smem_size)"
      9. Assume that an entity whose unqualified name is `_app_smem_rom_start' is defined.

        -extra_definitions+="name(_app_smem_rom_start)"
      10. Assume that an entity whose unqualified name is `_app_smem_num_words' is defined.

        -extra_definitions+="name(_app_smem_num_words)"
      11. Assume that an entity whose unqualified name is `__bss_start' is defined.

        -extra_definitions+="name(__bss_start)"
      12. Assume that an entity whose unqualified name is `__bss_end' is defined.

        -extra_definitions+="name(__bss_end)"
      13. Assume that an entity whose unqualified name is `__rom_region_start' is defined.

        -extra_definitions+="name(__rom_region_start)"
      14. Assume that an entity whose unqualified name is `__rom_region_end' is defined.

        -extra_definitions+="name(__rom_region_end)"
      15. Assume that an entity whose unqualified name is `__rom_region_size' is defined.

        -extra_definitions+="name(__rom_region_size)"
      16. Assume that an entity whose unqualified name is `_flash_used' is defined.

        -extra_definitions+="name(_flash_used)"
      17. Assume that an entity whose unqualified name is `_image_ram_start' is defined.

        -extra_definitions+="name(_image_ram_start)"
      18. Assume that an entity whose unqualified name is `_image_ram_end' is defined.

        -extra_definitions+="name(_image_ram_end)"
      19. Assume that an entity whose unqualified name is `__text_region_start' is defined.

        -extra_definitions+="name(__text_region_start)"
      20. Assume that an entity whose unqualified name is `__text_region_end' is defined.

        -extra_definitions+="name(__text_region_end)"
      21. Assume that an entity whose unqualified name is `__text_region_size' is defined.

        -extra_definitions+="name(__text_region_size)"
      22. Assume that an entity whose unqualified name is `__rodata_region_start' is defined.

        -extra_definitions+="name(__rodata_region_start)"
      23. Assume that an entity whose unqualified name is `__rodata_region_end' is defined.

        -extra_definitions+="name(__rodata_region_end)"
      24. Assume that an entity whose unqualified name is `__rodata_region_size' is defined.

        -extra_definitions+="name(__rodata_region_size)"
      25. Assume that an entity whose unqualified name is `_vector_start' is defined.

        -extra_definitions+="name(_vector_start)"
      26. Assume that an entity whose unqualified name is `_vector_end' is defined.

        -extra_definitions+="name(_vector_end)"
      27. Assume that an entity whose unqualified name is `_end' is defined.

        -extra_definitions+="name(_end)"
      28. Assume that an entity whose unqualified name is `__log_backends_start' is defined.

        -extra_definitions+="name(__log_backends_start)"
      29. Assume that an entity whose unqualified name is `__log_backends_end' is defined.

        -extra_definitions+="name(__log_backends_end)"
      30. Assume that an entity whose unqualified name is `__log_const_start' is defined.

        -extra_definitions+="name(__log_const_start)"
      31. Assume that an entity whose unqualified name is `__log_const_end' is defined.

        -extra_definitions+="name(__log_const_end)"
      32. Assume that an entity whose unqualified name is `__log_dynamic_start' is defined.

        -extra_definitions+="name(__log_dynamic_start)"
      33. Assume that an entity whose unqualified name is `__log_dynamic_end' is defined.

        -extra_definitions+="name(__log_dynamic_end)"
      34. Assume that an entity whose unqualified name is `__device_start' is defined.

        -extra_definitions+="name(__device_start)"
      35. Assume that an entity whose unqualified name is `__device_end' is defined.

        -extra_definitions+="name(__device_end)"
      36. Assume that an entity whose unqualified name is `__init_start' is defined.

        -extra_definitions+="name(__init_start)"
      37. Assume that an entity whose unqualified name is `__init_end' is defined.

        -extra_definitions+="name(__init_end)"
      38. Assume that an entity whose unqualified name is `z_shared_kernel_page_start' is defined.

        -extra_definitions+="name(z_shared_kernel_page_start)"
      39. Assume that an entity whose unqualified name is `z_priv_stacks_ram_start' is defined.

        -extra_definitions+="name(z_priv_stacks_ram_start)"
      40. Assume that an entity whose unqualified name is `z_priv_stacks_ram_end' is defined.

        -extra_definitions+="name(z_priv_stacks_ram_end)"
      41. Assume that an entity whose unqualified name is `z_user_stacks_start' is defined.

        -extra_definitions+="name(z_user_stacks_start)"
      42. Assume that an entity whose unqualified name is `z_user_stacks_end' is defined.

        -extra_definitions+="name(z_user_stacks_end)"
      43. Assume that an entity whose unqualified name is `z_kobject_data_begin' is defined.

        -extra_definitions+="name(z_kobject_data_begin)"
      44. Assume that an entity whose unqualified name is `__app_shmem_regions_start' is defined.

        -extra_definitions+="name(__app_shmem_regions_start)"
      45. Assume that an entity whose unqualified name is `__app_shmem_regions_end' is defined.

        -extra_definitions+="name(__app_shmem_regions_end)"
      46. Assume that an entity whose unqualified name is `_thread_idx_map' is defined.

        -extra_definitions+="name(_thread_idx_map)"
      47. Assume that an entity whose unqualified name is `z_data_smem_footprint_mem_partition_part_start' is defined.

        -extra_definitions+="name(z_data_smem_footprint_mem_partition_part_start)"
      48. Assume that an entity whose unqualified name is `z_data_smem_footprint_mem_partition_part_size' is defined.

        -extra_definitions+="name(z_data_smem_footprint_mem_partition_part_size)"
      49. Assume that an entity whose unqualified name is `z_data_smem_footprint_mem_partition_bss_start' is defined.

        -extra_definitions+="name(z_data_smem_footprint_mem_partition_bss_start)"
      50. Assume that an entity whose unqualified name is `z_data_smem_footprint_mem_partition_bss_size' is defined.

        -extra_definitions+="name(z_data_smem_footprint_mem_partition_bss_size)"
      51. Assume that an entity whose unqualified name is `z_object_gperf_find' is defined.

        -extra_definitions+="name(z_object_gperf_find)"
      52. Assume that an entity whose unqualified name is `z_object_gperf_wordlist_foreach' is defined.

        -extra_definitions+="name(z_object_gperf_wordlist_foreach)"
      53. Assume that an entity whose unqualified name is `_z_object_assignment_list_start' is defined.

        -extra_definitions+="name(_z_object_assignment_list_start)"
      54. Assume that an entity whose unqualified name is `_z_object_assignment_list_end' is defined.

        -extra_definitions+="name(_z_object_assignment_list_end)"
    3. Entities created with Z_LINK_ITERABLE in linker.ld

      As configured, ECLAIR will:

      1. Assume that an entity whose name matches the regex `^_(_static_thread_data|k_timer|k_mem_slab|k_mem_pool|k_heap|k_mutex|k_stack|k_msgq|k_mbox|k_pipe|k_sem|k_queue)_list_(start|end)$' is defined.

        -extra_definitions+="^_(_static_thread_data|k_timer|k_mem_slab|k_mem_pool|k_heap|k_mutex|k_stack|k_msgq|k_mbox|k_pipe|k_sem|k_queue)_list_(start|end)$"
    4. As configured, ECLAIR will:

      1. Assume that an entity whose name matches the regex `^z_mapped_(start|end)$' is defined.

        -extra_definitions+="^z_mapped_(start|end)$"
      2. Assume that an entity whose name matches the regex `^__init_(PRE_KERNEL_[12]|POST_KERNEL|APPLICATION|SMP)_start$' is defined.

        -extra_definitions+="^__init_(PRE_KERNEL_[12]|POST_KERNEL|APPLICATION|SMP)_start$"
  3. -file_tag

    1. Derived from Flavio Ceolin <flavio.ceolin@intel.com> email of July 23rd, 2021.

      As configured, ECLAIR will:

      1. Add tag `out_of_initial_scope' for a file whose canonical pathname matches the regex `^samples/.*$'.

        -file_tag+={out_of_initial_scope, "^samples/.*$"}
      2. Add tag `out_of_initial_scope' for a file whose canonical pathname matches the regex `^.*\.cpp$'.

        -file_tag+={out_of_initial_scope, "^.*\\.cpp$"}
      3. Add tag `out_of_initial_scope' for a file whose canonical pathname matches the regex `^tests/.*$'.

        -file_tag+={out_of_initial_scope, "^tests/.*$"}
      4. Add tag `out_of_initial_scope' for a file whose canonical pathname matches the regex `^build/zephyr/include/generated/autoconf\.h$'.

        -file_tag+={out_of_initial_scope, "^build/zephyr/include/generated/autoconf\\.h$"}
      5. Add tag `out_of_initial_scope' for a file whose canonical pathname matches the regex `^drivers/.*/.*$'.

        -file_tag+={out_of_initial_scope, "^drivers/.*/.*$"}
      6. Add tag `out_of_initial_scope' for a file whose canonical pathname matches the regex `^lib/libc/.*$'.

        -file_tag+={out_of_initial_scope, "^lib/libc/.*$"}
      7. Add tag `out_of_initial_scope' for a file whose canonical pathname matches the regex `^lib/crc/.*$'.

        -file_tag+={out_of_initial_scope, "^lib/crc/.*$"}
      8. Add tag `out_of_initial_scope' for a file whose canonical pathname matches the regex `^subsys/(fb|fs|app_memory|fs|blueooth|console|cpp|debug|dfu|disk|fb|fs|mgmt|net|random|settings|shell|stats|storage|usb)/.*$'.

        -file_tag+={out_of_initial_scope, "^subsys/(fb|fs|app_memory|fs|blueooth|console|cpp|debug|dfu|disk|fb|fs|mgmt|net|random|settings|shell|stats|storage|usb)/.*$"}
      9. Add tag `out_of_initial_scope' for a file whose canonical pathname matches the regex `^build/CMakeFiles/.*$'.

        -file_tag+={out_of_initial_scope, "^build/CMakeFiles/.*$"}
      10. Add tag `external' for a file with tag `out_of_initial_scope'.

        -file_tag+={external,out_of_initial_scope}
    2. As configured, ECLAIR will:

      1. Add tag `GCC' for a file whose canonical pathname matches the regex `^/opt/zephyr-sdk-0\.13\.2/(x86_64|aarch64)-zephyr-elf/bin/(x86_64|aarch64)-zephyr-elf-gcc$'.

        -file_tag+={GCC,"^/opt/zephyr-sdk-0\\.13\\.2/(x86_64|aarch64)-zephyr-elf/bin/(x86_64|aarch64)-zephyr-elf-gcc$"}
    3. FIXME.

      As configured, ECLAIR will:

      1. Add tag `api:public' for a file whose canonical pathname matches the regex `^modules/hal/cmsis/CMSIS/Core/Include/.*\.h$'.

        -file_tag+={api:public,"^modules/hal/cmsis/CMSIS/Core/Include/.*\\.h$"}
      2. Add tag `api:public' for a file whose canonical pathname matches the regex `^modules/hal/stm32/stm32cube/stm32f4xx/drivers/include/.*\.h$'.

        -file_tag+={api:public,"^modules/hal/stm32/stm32cube/stm32f4xx/drivers/include/.*\\.h$"}
      3. Add tag `api:public' for a file whose canonical pathname matches the regex `^modules/hal/stm32/stm32cube/stm32f4xx/drivers/include/Legacy/.*\.h$'.

        -file_tag+={api:public,"^modules/hal/stm32/stm32cube/stm32f4xx/drivers/include/Legacy/.*\\.h$"}
      4. Add tag `api:public' for a file whose canonical pathname matches the regex `^modules/hal/stm32/stm32cube/stm32f4xx/soc/.*\.h$'.

        -file_tag+={api:public,"^modules/hal/stm32/stm32cube/stm32f4xx/soc/.*\\.h$"}
      5. Add tag `api:public' for a file whose canonical pathname matches the regex `^kernel/include/.*\.h$'.

        -file_tag+={api:public,"^kernel/include/.*\\.h$"}
      6. Add tag `api:public' for a file whose canonical pathname matches the regex `^include/.*\.h$'.

        -file_tag+={api:public,"^include/.*\\.h$"}
    4. This header file is automatically generated by Autoconf.

      As configured, ECLAIR will:

      1. Add tag `adopted' for a file whose canonical pathname matches the regex `^build/zephyr/include/generated/autoconf\.h$'.

        -file_tag+={adopted,"^build/zephyr/include/generated/autoconf\\.h$"}
    5. These files are automatically generated by gperf.

      As configured, ECLAIR will:

      1. Add tag `adopted' for a file whose canonical pathname matches the regex `^build/zephyr/kobject_.*\.c$'.

        -file_tag+={adopted,"^build/zephyr/kobject_.*\\.c$"}
  4. -macro_selector

    1. Some macros are deliberately compile-time constants due to project configurability.

      As configured, ECLAIR will:

      1. Define `const_wrapper_macros' as a matcher for a macro whose name is `CONSTEXPR'.

        -macro_selector={const_wrapper_macros,"name(CONSTEXPR)"}
  5. -project_name

    1. As configured, ECLAIR will:

      1. Set the project name to `Zephyr'.

        -project_name=getenv("ECLAIR_PROJECT_NAME")
  6. -project_root

    1. As configured, ECLAIR will:

      1. Set the project root directory to `/builds/swquality/zephyr-auditable/'.

        -project_root=getenv("ECLAIR_PROJECT_ROOT")
  7. -public_files

    1. As configured, ECLAIR will:

      1. Consider as belonging to public API a file with tag `api:public'.

        -public_files+=api:public
  8. -remap_rtag

    1. As configured, ECLAIR will:

      1. Map report tag `compliant' to `hide'.

        -remap_rtag={compliant,hide}
      2. Map report tag `safe' to `hide'.

        -remap_rtag={safe,hide}
      3. Map report tag `relied' to `hide'.

        -remap_rtag={relied,hide}
      4. Map report tag `questionable' to `hide'.

        -remap_rtag={questionable,hide}
      5. Map report tag `deliberate' to `hide'.

        -remap_rtag={deliberate,hide}
      6. Map report tag `disapplied' to `hide'.

        -remap_rtag={disapplied,hide}
  9. -report_selector

    1. Selection for reports that are fully contained in adopted code.

      As configured, ECLAIR will:

      1. Define `adopted_report' as a matcher for a report where every area is an area that satisfies !$A || $B:

        1. $A matches an area whose kind is culprit or evidence.

        2. $B matches an area where every location is a location where every element in its expansion chain is a location in a file that satisfies `adopted' || `pseudo'.

        -report_selector+={adopted_report,"all_area(!kind(culprit||evidence)||all_loc(all_exp(adopted||pseudo)))"}
  10. -reports

    1. Hides all reports that have all areas out of scope.

      As configured, ECLAIR will:

      1. Hide a report matching `all_exp_external'.

        -reports+={hide,all_exp_external}

Service B.EXPLAIN: Explain user configuration

  1. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=B.EXPLAIN

Service B.REPORT.ECB: Output reports in ECB format

  1. macros

    1. As configured, ECLAIR will:

      1. Show up to 10 levels of macro expansions in report areas.

        -config=B.REPORT.ECB,macros=10
  2. output

    1. As configured, ECLAIR will:

      1. Write the reports output to file `/builds/swquality/zephyr-auditable/ECLAIR/.data/FRAME.@FRAME@.ecb'.

        -config=B.REPORT.ECB,output=join_paths(data_dir,"FRAME.@FRAME@.ecb")
  3. preprocessed

    1. As configured, ECLAIR will:

      1. Show the preprocessed source for report areas with macro expansions.

        -config=B.REPORT.ECB,preprocessed=show
  4. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=B.REPORT.ECB

Service MC3R1.D4.9: A function should be used in preference to a function-like macro where they are interchangeable

  1. macros

    1. The following function-like macros are not writable as inline functions.

      As configured, ECLAIR will:

      1. Add tag `deliberate' to any report apropos of a macro whose name is `ARG_UNUSED'.

        -config=MC3R1.D4.9,macros+={deliberate,"name(ARG_UNUSED)"}
      2. Add tag `deliberate' to any report apropos of a macro whose name is `CONSTEXPR'.

        -config=MC3R1.D4.9,macros+={deliberate,"name(CONSTEXPR)"}
      3. Add tag `deliberate' to any report apropos of a macro whose name is `compiler_barrier'.

        -config=MC3R1.D4.9,macros+={deliberate,"name(compiler_barrier)"}
      4. Add tag `deliberate' to any report apropos of a macro whose name is `likely'.

        -config=MC3R1.D4.9,macros+={deliberate,"name(likely)"}
      5. Add tag `deliberate' to any report apropos of a macro whose name is `unlikely'.

        -config=MC3R1.D4.9,macros+={deliberate,"name(unlikely)"}
    2. For the following function-like macros it should be decided whether substitution with equivalent static inline functions is wanted and feasible.

      As configured, ECLAIR will:

      1. Add tag `questionable' to any report apropos of a macro whose name is `ATOMIC_ELEM'.

        -config=MC3R1.D4.9,macros+={questionable,"name(ATOMIC_ELEM)"}
      2. Add tag `questionable' to any report apropos of a macro whose name is `ATOMIC_MASK'.

        -config=MC3R1.D4.9,macros+={questionable,"name(ATOMIC_MASK)"}
      3. Add tag `questionable' to any report apropos of a macro whose name is `BIT32'.

        -config=MC3R1.D4.9,macros+={questionable,"name(BIT32)"}
      4. Add tag `questionable' to any report apropos of a macro whose name is `BIT64'.

        -config=MC3R1.D4.9,macros+={questionable,"name(BIT64)"}
      5. Add tag `questionable' to any report apropos of a macro whose name is `BIT64_MASK'.

        -config=MC3R1.D4.9,macros+={questionable,"name(BIT64_MASK)"}
      6. Add tag `questionable' to any report apropos of a macro whose name is `BIT_MASK'.

        -config=MC3R1.D4.9,macros+={questionable,"name(BIT_MASK)"}
      7. Add tag `questionable' to any report apropos of a macro whose name is `DEVICE_MMIO_GET'.

        -config=MC3R1.D4.9,macros+={questionable,"name(DEVICE_MMIO_GET)"}
      8. Add tag `questionable' to any report apropos of a macro whose name is `DEVICE_MMIO_MAP'.

        -config=MC3R1.D4.9,macros+={questionable,"name(DEVICE_MMIO_MAP)"}
      9. Add tag `questionable' to any report apropos of a macro whose name is `DEVICE_MMIO_RAM_PTR'.

        -config=MC3R1.D4.9,macros+={questionable,"name(DEVICE_MMIO_RAM_PTR)"}
      10. Add tag `questionable' to any report apropos of a macro whose name is `IN'.

        -config=MC3R1.D4.9,macros+={questionable,"name(IN)"}
      11. Add tag `questionable' to any report apropos of a macro whose name is `LOG_CORE_INIT'.

        -config=MC3R1.D4.9,macros+={questionable,"name(LOG_CORE_INIT)"}
      12. Add tag `questionable' to any report apropos of a macro whose name is `MAX'.

        -config=MC3R1.D4.9,macros+={questionable,"name(MAX)"}
      13. Add tag `questionable' to any report apropos of a macro whose name is `MB'.

        -config=MC3R1.D4.9,macros+={questionable,"name(MB)"}
      14. Add tag `questionable' to any report apropos of a macro whose name is `MIN'.

        -config=MC3R1.D4.9,macros+={questionable,"name(MIN)"}
      15. Add tag `questionable' to any report apropos of a macro whose name is `OUT'.

        -config=MC3R1.D4.9,macros+={questionable,"name(OUT)"}
      16. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_BDF'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_BDF)"}
      17. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_BDF_TO_BUS'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_BDF_TO_BUS)"}
      18. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_BAR_64'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_BAR_64)"}
      19. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_BAR_ADDR'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_BAR_ADDR)"}
      20. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_BAR_INVAL_FLAGS'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_BAR_INVAL_FLAGS)"}
      21. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_BAR_IO'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_BAR_IO)"}
      22. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_BAR_MEM'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_BAR_MEM)"}
      23. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_CAPPTR_FIRST'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_CAPPTR_FIRST)"}
      24. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_CAP_ID'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_CAP_ID)"}
      25. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_CAP_NEXT'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_CAP_NEXT)"}
      26. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_EXT_CAP_ID'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_EXT_CAP_ID)"}
      27. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_EXT_CAP_NEXT'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_EXT_CAP_NEXT)"}
      28. Add tag `questionable' to any report apropos of a macro whose name is `PCIE_CONF_INTR_IRQ'.

        -config=MC3R1.D4.9,macros+={questionable,"name(PCIE_CONF_INTR_IRQ)"}
      29. Add tag `questionable' to any report apropos of a macro whose name is `POINTER_TO_UINT'.

        -config=MC3R1.D4.9,macros+={questionable,"name(POINTER_TO_UINT)"}
      30. Add tag `questionable' to any report apropos of a macro whose name is `ROUND_DOWN'.

        -config=MC3R1.D4.9,macros+={questionable,"name(ROUND_DOWN)"}
      31. Add tag `questionable' to any report apropos of a macro whose name is `ROUND_UP'.

        -config=MC3R1.D4.9,macros+={questionable,"name(ROUND_UP)"}
      32. Add tag `questionable' to any report apropos of a macro whose name is `UINT_TO_POINTER'.

        -config=MC3R1.D4.9,macros+={questionable,"name(UINT_TO_POINTER)"}
      33. Add tag `questionable' to any report apropos of a macro whose name is `Z_BOOT_VIRT_TO_PHYS'.

        -config=MC3R1.D4.9,macros+={questionable,"name(Z_BOOT_VIRT_TO_PHYS)"}
      34. Add tag `questionable' to any report apropos of a macro whose name is `Z_IRQ_TO_INTERRUPT_VECTOR'.

        -config=MC3R1.D4.9,macros+={questionable,"name(Z_IRQ_TO_INTERRUPT_VECTOR)"}
      35. Add tag `questionable' to any report apropos of a macro whose name is `Z_KERNEL_STACK_SIZE_ADJUST'.

        -config=MC3R1.D4.9,macros+={questionable,"name(Z_KERNEL_STACK_SIZE_ADJUST)"}
      36. Add tag `questionable' to any report apropos of a macro whose name is `Z_LOG_MSG2_ALIGNED_WLEN'.

        -config=MC3R1.D4.9,macros+={questionable,"name(Z_LOG_MSG2_ALIGNED_WLEN)"}
      37. Add tag `questionable' to any report apropos of a macro whose name is `Z_MEM_PHYS_ADDR'.

        -config=MC3R1.D4.9,macros+={questionable,"name(Z_MEM_PHYS_ADDR)"}
      38. Add tag `questionable' to any report apropos of a macro whose name is `Z_MEM_VIRT_ADDR'.

        -config=MC3R1.D4.9,macros+={questionable,"name(Z_MEM_VIRT_ADDR)"}
      39. Add tag `questionable' to any report apropos of a macro whose name is `Z_STACK_PTR_ALIGN'.

        -config=MC3R1.D4.9,macros+={questionable,"name(Z_STACK_PTR_ALIGN)"}
      40. Add tag `questionable' to any report apropos of a macro whose name is `Z_THREAD_STACK_SIZE_ADJUST'.

        -config=MC3R1.D4.9,macros+={questionable,"name(Z_THREAD_STACK_SIZE_ADJUST)"}
      41. Add tag `questionable' to any report apropos of a macro whose name is `Z_TICK_ABS'.

        -config=MC3R1.D4.9,macros+={questionable,"name(Z_TICK_ABS)"}
      42. Add tag `questionable' to any report apropos of a macro whose name is `ceiling_fraction'.

        -config=MC3R1.D4.9,macros+={questionable,"name(ceiling_fraction)"}
      43. Add tag `questionable' to any report apropos of a macro whose name is `irq_enable'.

        -config=MC3R1.D4.9,macros+={questionable,"name(irq_enable)"}
      44. Add tag `questionable' to any report apropos of a macro whose name is `irq_lock'.

        -config=MC3R1.D4.9,macros+={questionable,"name(irq_lock)"}
      45. Add tag `questionable' to any report apropos of a macro whose name is `irq_unlock'.

        -config=MC3R1.D4.9,macros+={questionable,"name(irq_unlock)"}
      46. Add tag `questionable' to any report apropos of a macro whose name is `k_panic'.

        -config=MC3R1.D4.9,macros+={questionable,"name(k_panic)"}

Service MC3R1.R1.2: Language extensions should not be used

  1. behaviors

    1. The following extension have been approved.

      As configured, ECLAIR will:

      1. Hide a behavior that satisfies $A && $B:

        1. $A matches a behavior checked by the service `STD.tokenext'.

        2. $B matches a behavior whose report category matches the regex `^(__asm__|__attribute__|__typeof__|__builtin_types_compatible_p|__volatile__|__alignof|__alignof__|__const__|__inline|_Generic|_Static_assert|__auto_type)$'.

        -config=MC3R1.R1.2,behaviors+={hide,"service(STD.tokenext)&&category(^(__asm__|__attribute__|__typeof__|__builtin_types_compatible_p|__volatile__|__alignof|__alignof__|__const__|__inline|_Generic|_Static_assert|__auto_type)$)"}
      2. Hide a behavior checked by a service whose name matches the regex `^STD.(stmtexpr|vptrarth|emptinit|emptrecd|arayzero|funojptr)$'.

        -config=MC3R1.R1.2,behaviors+={hide,"service(^STD.(stmtexpr|vptrarth|emptinit|emptrecd|arayzero|funojptr)$)"}
      3. Hide a behavior that satisfies $A && $B:

        1. $A matches a behavior checked by the service `STD.nonstdc'.

        2. $B matches a behavior whose report category matches the regex `^GCC diagnostic (push|pop|ignored "-W.*")$'.

        -config=MC3R1.R1.2,behaviors+={hide,"service(STD.nonstdc)&&category(^GCC diagnostic (push|pop|ignored \"-W.*\")$)"}
      4. Hide a behavior that satisfies $A && $B:

        1. $A matches a behavior checked by the service `STD.freestlb'.

        2. $B matches a behavior whose report category matches the regex `^(string|fcntl|time|errno|ctype|stdio|inttypes|stdlib).h$'.

        -config=MC3R1.R1.2,behaviors+={hide,"service(STD.freestlb)&&category(^(string|fcntl|time|errno|ctype|stdio|inttypes|stdlib).h$)"}
      5. Hide a behavior that satisfies $A && $B:

        1. $A matches a behavior checked by the service `STD.diag'.

        2. $B matches a behavior whose report category matches the regex `^(ext_missing_varargs_arg|ext_paste_comma|ext_flexible_array_in_array|ext_auto_type)$'.

        -config=MC3R1.R1.2,behaviors+={hide,"service(STD.diag)&&category(^(ext_missing_varargs_arg|ext_paste_comma|ext_flexible_array_in_array|ext_auto_type)$)"}

Service MC3R1.R2.1: A project shall not contain unreachable code

  1. declarations

    1. Library entry points not necessarily have to be referenced.

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a declaration written in a location whose top expansion is a location in a public API header file.

        -config=MC3R1.R2.1,declarations+={safe,"loc(top(public()))"}
  2. reports

    1. Use of CODE_UNREACHABLE is defensive programming.

      As configured, ECLAIR will:

      1. Add tag `safe' to a report where at least one area is an area where at least one location is a location where an element in its expansion chain is a location expanded from a macro whose name is `CODE_UNREACHABLE'.

        -config=MC3R1.R2.1,reports+={safe,"any_area(any_loc(any_exp(macro(name(CODE_UNREACHABLE)))))"}

Service MC3R1.R2.3: A project should not contain unused type declarations

  1. declarations

    1. The declarations in files tagged with api:public define a public API of Zephyr. Declarations in these files not necessarily have to be referenced.

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a declaration written in a location whose top expansion is a location in a public API header file.

        -config=MC3R1.R2.3,declarations+={safe,"loc(top(public()))"}

Service MC3R1.R2.7: There should be no unused parameters in functions

  1. declarations

    1. Function hash, that is automatically generated, does not use the parameter "len" in all its definitions.

      As configured, ECLAIR will:

      1. Add tag `relied' to any report apropos of a declaration that satisfies $A && $B:

        1. $A matches a declaration whose context is a declaration whose name matches the regex `^hash\(const char\*, size_t\)$'.

        2. $B matches a declaration whose unqualified name is `len'.

        -config=MC3R1.R2.7,declarations+={relied,"context(^hash\\(const char\\*, size_t\\)$)&&name(len)"}

Service MC3R1.R7.2: A `u' or `U' suffix shall be applied to all integer constants that are represented in an unsigned type

  1. reports

    1. Adopted code is not meant to be read, reviewed or modified by human programmers:no developers' confusion is not possible. In addition, adopted code is assumed to work as is. Reports that are fully contained in adopted code are hidden/tagged with the 'adopted' tag.

      As configured, ECLAIR will:

      1. Add tag `relied' to a report matching `adopted_report'.

        -config=MC3R1.R7.2,reports+={relied,adopted_report}
    2. Macro CONFIG_LOAPIC_BASE_ADDRESS, automatically generated by Autoconf, expands to an implicitly unsigned literal lacking the 'u' or 'U' suffix.

      As configured, ECLAIR will:

      1. Add tag `safe' to a report where every area is an area where every location is a location where an element in its expansion chain is a location expanded from a macro whose name matches the regex `^assert$'.

        -config=MC3R1.R7.2,reports+={safe,"all_area(all_loc(any_exp(macro(^assert$))))"}

Service MC3R1.R8.6: An identifier with external linkage shall have exactly one external definition

  1. declarations

    1. Multiple definitions are expected for weak symbols.

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a declaration with attribute `weak'.

        -config=MC3R1.R8.6,declarations+={safe,"attribute(weak)"}
    2. The following declarations are in generated files: not in all configuration they are implemented. Chainging the generators could be dangerous and the advantages in enforcing the rule do not outweight these dangers.

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a declaration written in a location whose top expansion is a location in a file whose canonical pathname matches the regex `^build/zephyr/include/generated/.*$'.

        -config=MC3R1.R8.6,declarations+={safe, "loc(top(file(^build/zephyr/include/generated/.*$)))"}

Service MC3R1.R8.7: Functions and objects should not be defined with external linkage if they are referenced in only one translation unit

  1. declarations

    1. Library entry points not necessarily have to be referenced in more than one translation units.

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a declaration written in a location whose top expansion is a location in a public API header file.

        -config=MC3R1.R8.7,declarations+={safe,"loc(top(public()))"}

Service MC3R1.R8.8: The `static' storage class specifier shall be used in all declarations of objects and functions that have internal linkage

  1. declarations

    1. Syscall declarations are automatically generated all with the extern qualifier. For the ones with internal linkage the use of the extern qualifier is a violation of rule 8.8.

      As configured, ECLAIR will:

      1. Add tag `relied' to any report apropos of a declaration that satisfies $A || $B:

        1. $A matches a declaration whose name matches the regex `^z_vrfy_.*$'.

        2. $B matches a declaration whose name matches the regex `^z_impl_.*$'.

        -config=MC3R1.R8.8,declarations={relied, "^z_vrfy_.*$||^z_impl_.*$"}

Service MC3R1.R10.1: Operands shall not be of an inappropriate essential type

  1. etypes

    1. The value-preserving conversions of integer constants are safe

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of an integer constant expression that is converted to an integer essential type that can represent the value, in the context of any node.

        -config=MC3R1.R10.1,etypes={safe,"any()","preserved_integer_constant()"}

Service MC3R1.R10.3: The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category

  1. etypes

    1. The value-preserving conversions of integer constants are safe

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of an integer constant expression that is converted to an integer essential type that can represent the value, in the context of any node.

        -config=MC3R1.R10.3,etypes={safe,"any()","preserved_integer_constant()"}
  2. reports

    1. Adopted code is not meant to be read, reviewed or modified by human programmers:no developers' confusion is not possible. In addition, adopted code is assumed to work as is. Reports that are fully contained in adopted code are hidden/tagged with the 'adopted' tag.

      As configured, ECLAIR will:

      1. Add tag `relied' to a report matching `adopted_report'.

        -config=MC3R1.R10.3,reports+={relied,adopted_report}

Service MC3R1.R10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category

  1. etypes

    1. The value-preserving conversions of integer constants are safe

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of an expression that satisfies $A || $B, in the context of any node:

        1. $A matches an integer constant expression that is converted to an integer essential type that can represent the value.

        2. $B matches an expression whose sibling (the parent operator's right operand) is an integer constant expression that is converted to an integer essential type that can represent the value.

        -config=MC3R1.R10.4,etypes={safe,"any()","preserved_integer_constant()||sibling(rhs,preserved_integer_constant())"}

Service MC3R1.R10.6: The value of a composite expression shall not be assigned to an object with wider essential type

  1. reports

    1. Adopted code is not meant to be read, reviewed or modified by human programmers:no developers' confusion is not possible. In addition, adopted code is assumed to work as is. Reports that are fully contained in adopted code are hidden/tagged with the 'adopted' tag.

      As configured, ECLAIR will:

      1. Add tag `relied' to a report matching `adopted_report'.

        -config=MC3R1.R10.6,reports+={relied,adopted_report}

Service MC3R1.R11.6: A cast shall not be performed between pointer to `void' and an arithmetic type

  1. casts

    1. Unevaluated casts are perfectly safe.

      As configured, ECLAIR will:

      1. Hide any report apropos of a context matching `__unevaluated_contexts'.

        -config=MC3R1.R11.6,casts={hide, "context(__unevaluated_contexts)"}
  2. reports

    1. Casts to log_arg_t in logging macros are safe and expected.

      As configured, ECLAIR will:

      1. Add tag `deliberate' to a report where at least one area is an area where at least one location is a location where an element in its expansion chain is a location expanded from a macro whose name is `__LOG_ARG_CAST'.

        -config=MC3R1.R11.6,reports+={deliberate,"any_area(any_loc(any_exp(macro(name(__LOG_ARG_CAST)))))"}

Service MC3R1.R12.1: The precedence of operators within expressions should be made explicit

  1. reports

    1. Adopted code is not meant to be read, reviewed or modified by human programmers:no developers' confusion is not possible. In addition, adopted code is assumed to work as is. Reports that are fully contained in adopted code are hidden/tagged with the 'adopted' tag.

      As configured, ECLAIR will:

      1. Add tag `relied' to a report matching `adopted_report'.

        -config=MC3R1.R12.1,reports+={relied,adopted_report}

Service MC3R1.R14.3: Controlling expressions shall not be invariant

  1. statements

    1. Some macros are deliberately compile-time constants due to project configurability.

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a statement that satisfies $A && $B:

        1. $A matches an `if' statement or a `?:' conditional operator.

        2. $B matches a statement whose condition matches a statement wrapped 0 or more times by an expression that satisfies $C && !$D, that is an expression expanded from a macro matching `const_wrapper_macros'.

        3. $C matches a parenthesized expression.

        4. $D matches an expression expanded from a macro matching `const_wrapper_macros'.

        -config=MC3R1.R14.3,statements={safe, "node(if_stmt||conditional_operator)&&child(cond,wrapped(node(paren_expr)&&!macro(const_wrapper_macros), macro(const_wrapper_macros)))"}

Service MC3R1.R15.6: The body of an iteration-statement or a selection-statement shall be a compound-statement

  1. reports

    1. Function "z_object_lookup", that is automatically generated, uses single-statement bodies not enclosed in braces.

      As configured, ECLAIR will:

      1. Add tag `relied' to a report where every area is an area whose context is a declaration whose name matches the regex `^z_object_lookup\(const char\*, size_t\)$'.

        -config=MC3R1.R15.6,reports={relied, "all_area(context(^z_object_lookup\\(const char\\*, size_t\\)$))"}

Service MC3R1.R20.7: Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses

  1. macros

    1. These macros pass its first argument in a safe way to related compiler intrinsics.

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a macro whose name matches the regex `^(va_start||va_arg)$'.

        -config=MC3R1.R20.7,macros={safe,"^(va_start||va_arg)$"}

Service MC3R1.R21.1: `#define' and `#undef' shall not be used on a reserved identifier or reserved macro name

  1. macros

    1. Identifers beginning with _ are tolerated.

      As configured, ECLAIR will:

      1. Add tag `relied' to any report apropos of a macro whose name matches the regex `^_.*$'.

        -config=MC3R1.R21.1,macros={relied,"^_.*$"}

Service MC3R1.R21.2: A reserved identifier or reserved macro name shall not be declared

  1. declarations

    1. Identifers beginning with _ are tolerated.

      As configured, ECLAIR will:

      1. Add tag `relied' to any report apropos of a declaration whose name matches the regex `^(.*::)?_.*$'.

        -config=MC3R1.R21.2,declarations={relied,"^(.*::)?_.*$"}

Service STD.arayzero: A zero size array type

  1. behavior

    1. See Chapter "6.18 Arrays of Length Zero" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf.

      As configured, ECLAIR will:

      1. Consider as specified the ill-formed behavior of the C99 standard, ISO/IEC 9899:1999 (Section 6.5.4.2: ``a zero size array type'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.arayzero,behavior={c99,GCC,specified}

Service STD.bitfldtp: Non-standard bit-field types

  1. behavior

    1. See Section "4.9 Structures, Unions, Enumerations, and Bit-Fields" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf. Other integer types, such as long int, and enumerated types are permitted even in strictly conforming mode.

      As configured, ECLAIR will:

      1. Assume the allowed bit-field types include `unsigned char' and `unsigned short' for the implementation-defined behavior of the C99 standard, ISO/IEC 9899:1999 (Annex J.3.9 item 2: ``allowable bit-field types other than `_Bool', `signed int', and `unsigned int' (6.7.2.1)'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.bitfldtp,behavior+={c99, GCC, "unsigned char||unsigned short"}
      2. Assume the allowed bit-field types include `unsigned char' and `unsigned short' for the implementation-defined behavior of the C18 standard, ISO/IEC 9899:2018 (Annex J.3.9 item 2: ``allowable bit-field types other than `_Bool', `signed int', and `unsigned int' (6.7.2.1)'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.bitfldtp,behavior+={c18, GCC, "unsigned char||unsigned short"}

Service STD.byteobjt: Bytes in an object (in a hosted environment only)

  1. behavior

    1. The maximum size of an object is defined in the MAX_SIZE macro, and for a 32 bit architecture is 8MB. The maximum size for an array is defined in the PTRDIFF_MAX and in a 32 bit architecture is 2^30-1.

      As configured, ECLAIR will:

      1. Assume 8388608 as the limit for the limiting behavior of the C99 standard, ISO/IEC 9899:1999 (Section 5.2.4.1 item 17: ``bytes in an object (in a hosted environment only)'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.byteobjt,behavior={c99, GCC, 8388608}

Service STD.diag: An ill-formed source detected by the parser

  1. behavior

    1. ext_missing_varargs_arg: non-documented GCC extension. ext_paste_comma: see Chapter "6.21 Macros with a Variable Number of Arguments." of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf. ext_flexible_array_in_array: see Chapter "6.18 Arrays of Length Zero" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf.

      As configured, ECLAIR will:

      1. Assume the behavior instances shown by a diagnostic with a name matching the regex `^(ext_missing_varargs_arg|ext_paste_comma|ext_flexible_array_in_array)$' as specified for the ill-formed behavior of the C99 standard, ISO/IEC 9899:1999 (: ``an ill-formed source detected by the parser'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.diag,behavior+={c99,GCC,"^(ext_missing_varargs_arg|ext_paste_comma|ext_flexible_array_in_array)$"}
      2. Assume the behavior instances shown by a diagnostic with a name matching the regex `^(ext_missing_varargs_arg)$' as specified for the ill-formed behavior of the C18 standard, ISO/IEC 9899:2018 (: ``an ill-formed source detected by the parser'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.diag,behavior+={c18,GCC,"^(ext_missing_varargs_arg)$"}
  2. diagnostics

    1. See Chapter "6.7 Referring to a Type with typeof". of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf.

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a diagnostic that has a name matching the regex `^ext_auto_type$'.

        -config=STD.diag,diagnostics={safe,"^ext_auto_type$"}

Service STD.emptinit: An empty initialization list

  1. behavior

    1. Non-documented GCC extension

      As configured, ECLAIR will:

      1. Consider as specified the ill-formed behavior of the C99 standard, ISO/IEC 9899:1999 (Section 6.7.8: ``an empty initialization list'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.emptinit,behavior={c99,GCC,specified}
      2. Consider as specified the ill-formed behavior of the C18 standard, ISO/IEC 9899:2018 (Section 6.7.9: ``an empty initialization list'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.emptinit,behavior={c18,GCC,specified}

Service STD.emptrecd: A structure or union definition with no members

  1. behavior

    1. See Chapter "6.19 Structures with No Members" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf.

      As configured, ECLAIR will:

      1. Consider as specified the ill-formed behavior of the C99 standard, ISO/IEC 9899:1999 (Section 6.7.2.1: ``a structure or union definition with no members'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.emptrecd,behavior={c99,GCC,specified}
      2. Consider as specified the ill-formed behavior of the C18 standard, ISO/IEC 9899:2018 (Section 6.7.2.1: ``a structure or union definition with no members'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.emptrecd,behavior={c18,GCC,specified}

Service STD.freestlb: Any library facilities available to a freestanding program, other than the minimal set required

  1. behavior

    1. Allowed headers in freestanding mode.

      As configured, ECLAIR will:

      1. Assume, for freestanding compilation, a header file whose name matches the regex `^(string|fcntl|time|errno|ctype|stdio|inttypes|stdlib).h$' for the implementation-defined behavior of the C99 standard, ISO/IEC 9899:1999 (Annex J.3.12 item 1: ``any library facilities available to a freestanding program, other than the minimal set required by clause 4 (5.1.2.1)'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.freestlb,behavior+={c99,GCC,"^(string|fcntl|time|errno|ctype|stdio|inttypes|stdlib).h$"}
      2. Assume, for freestanding compilation, a header file whose name matches the regex `^(string|errno|inttypes).h$' for the implementation-defined behavior of the C18 standard, ISO/IEC 9899:2018 (Annex J.3.12 item 1: ``any library facilities available to a freestanding program, other than the minimal set required by clause 4 (5.1.2.1)'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.freestlb,behavior+={c18,GCC,"^(string|errno|inttypes).h$"}

Service STD.funojptr: A pointer to a function is cast to a pointer to an object or a pointer to an object is cast to a pointer to a function

  1. behavior

    1. See Annex "J.5.7 Function pointer casts" of ISO/IEC 9899:1999.

      As configured, ECLAIR will:

      1. Consider as specified the ill-formed behavior of the C99 standard, ISO/IEC 9899:1999 (Annex J.5.7: ``a pointer to a function is converted to a pointer to an object or a pointer to an object is converted to a pointer to a function (6.5.4, 6.3.2.3)'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.funojptr,behavior={c99,GCC,specified}

Service STD.inclnest: Nesting levels for `#include' files

  1. behavior

    1. As configured, ECLAIR will:

      1. Assume 24 as the limit for the limiting behavior of the C99 standard, ISO/IEC 9899:1999 (Section 5.2.4.1 item 18: ``nesting levels for `#include' files'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.inclnest,behavior+={c99, GCC, 24}

Service STD.macident: Macro identifiers simultaneously defined in one preprocessing translation unit

  1. behavior

    1. As configured, ECLAIR will:

      1. Assume 4096 as the limit for the limiting behavior of the C99 standard, ISO/IEC 9899:1999 (Section 5.2.4.1 item 10: ``macro identifiers simultaneously defined in one preprocessing translation unit'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.macident,behavior+={c99, GCC, 4096}

Service STD.nonstdc: A non-`STDC' `#pragma' preprocessing directive that is documented as causing translation failure or some other form of undefined behavior is encountered

  1. behavior

    1. See Section "6.62.13 Diagnostic Pragmas" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf.

      As configured, ECLAIR will:

      1. Assume a pragma with a name matching the regex `^GCC diagnostic (push|pop|ignored "-W.*")$' as specified for the undefined behavior of the C99 standard, ISO/IEC 9899:1999 (Annex J.2 item 91: ``a non-`STDC' `#pragma' preprocessing directive that is documented as causing translation failure or some other form of undefined behavior is encountered (6.10.6)'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.nonstdc,behavior+={c99, GCC, "^GCC diagnostic (push|pop|ignored \"-W.*\")$"}
      2. Assume a pragma with a name matching the regex `^GCC diagnostic (push|pop|ignored "-W.*")$' as specified for the undefined behavior of the C18 standard, ISO/IEC 9899:2018 (Annex J.2 item 97: ``a non-`STDC' `#pragma' preprocessing directive that is documented as causing translation failure or some other form of undefined behavior is encountered (6.10.6)'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.nonstdc,behavior+={c18, GCC, "^GCC diagnostic (push|pop|ignored \"-W.*\")$"}

Service STD.ppifnest: Nesting levels of conditional inclusion

  1. behavior

    1. As configured, ECLAIR will:

      1. Assume 32 as the limit for the limiting behavior of the C99 standard, ISO/IEC 9899:1999 (Section 5.2.4.1 item 2: ``nesting levels of conditional inclusion'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.ppifnest,behavior+={c99, GCC, 32}

Service STD.prepdirc: The behavior for each non-standard preprocessing directive

  1. directives

    1. #include_next is a documented GNU preprocessing directive. See section "2.7 Wrapper Headers" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/cpp.pdf

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a directive matching the regex `^include_next$'.

        -config=STD.prepdirc,directives+={safe,"^include_next$"}
    2. #warning is a documented GNU preprocessing directive. See section "5 Diagnostics" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/cpp.pdf

      As configured, ECLAIR will:

      1. Add tag `safe' to any report apropos of a directive matching the regex `^warning$'.

        -config=STD.prepdirc,directives+={safe,"^warning$"}

Service STD.stmtexpr: A GNU statement expression

  1. behavior

    1. See Chapter "6.1 Statements and Declarations in Expressions" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf.

      As configured, ECLAIR will:

      1. Consider as specified the ill-formed behavior of the C99 standard, ISO/IEC 9899:1999 (Section 6.8: ``a GNU statement expression'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.stmtexpr,behavior+={c99,GCC,specified}

Service STD.tokenext: A non-standard token

  1. behavior

    1. See Chapter "6 Extensions to the C Language Family" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf: __auto_type: see "6.7 Referring to a Type with typeof"; __asm__: see "6.48 Alternate Keywords", and "6.47 How to Use Inline Assembly Language in C Code"; __attribute__: see "6.39 Attribute Syntax"; __typeof__: see "6.7 Referring to a Type with typeof"; __builtin_types_compatible_p: see "6.59 Other Built-in Functions Provided by GCC"; __volatile__: see "6.48 Alternate Keywords" and "6.47.2.1 Volatile"; __alignof: see "6.48 Alternate Keywords" and "6.44 Determining the Alignment of Functions, Types or Variables"; __alignof__: see "6.48 Alternate Keywords" and "6.44 Determining the Alignment of Functions, Types or Variables"; __const__: see "6.48 Alternate Keywords"; __inline: see "6.48 Alternate Keywords"; _Generic: see description of option "-Wc99-c11-compat" in "3.8 Options to Request or Suppress Warnings". The compiler allows to C11 features in C99 mode; _Static_assert: see descriptions of options "-Wc99-c11-compat" and "-Wc99-c2x-compat" in "3.8 Options to Request or Suppress Warnings". The compiler allows to use C11 and C2x features in C99 mode.

      As configured, ECLAIR will:

      1. Assume any token with a name matching the regex `^(__auto_type|__asm__|__attribute__|__typeof__|__builtin_types_compatible_p|__volatile__|__alignof|__alignof__|__const__|__inline|_Generic|_Static_assert)$' as specified for the ill-formed behavior of the C99 standard, ISO/IEC 9899:1999 (Section 6.4: ``a non-standard token'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.tokenext,behavior+={c99, GCC, "^(__auto_type|__asm__|__attribute__|__typeof__|__builtin_types_compatible_p|__volatile__|__alignof|__alignof__|__const__|__inline|_Generic|_Static_assert)$"}
      2. Assume any token with a name matching the regex `^(__attribute__|__asm__|__const__|__volatile__|__inline)$' as specified for the ill-formed behavior of the C18 standard, ISO/IEC 9899:2018 (Section 6.4: ``a non-standard token'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.tokenext,behavior+={c18, GCC, "^(__attribute__|__asm__|__const__|__volatile__|__inline)$"}

Service STD.vptrarth: An arithmetic operator on `void *' type

  1. behavior

    1. See Chapter "6.24 Arithmetic on void- and Function-Pointers" of https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc.pdf.

      As configured, ECLAIR will:

      1. Consider as specified the ill-formed behavior of the C99 standard, ISO/IEC 9899:1999 (Section 6.5: ``an arithmetic operator on `void *' type'') and a compiler whose executable is a file with tag `GCC'.

        -config=STD.vptrarth,behavior={c99,GCC,specified}