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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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 never 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\.15\.1/(x86_64|aarch64)-zephyr-elf/bin/(x86_64|aarch64)-zephyr-elf-gcc$'.

        -file_tag+={GCC,"^/opt/zephyr-sdk-0\\.15\\.1/(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.D1.1: Any implementation-defined behaviour on which the output of the program depends shall be documented and understood

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D1.1

Service MC3R1.D2.1: All source files shall compile without any compilation errors

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D2.1

Service MC3R1.D3.1: All code shall be traceable to documented requirements

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D3.1

Service MC3R1.D4.1: Run-time failures shall be minimized

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.1

Service MC3R1.D4.2: All usage of assembly language should be documented

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.2

Service MC3R1.D4.4: Sections of code should not be "commented out"

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.4

Service MC3R1.D4.5: Identifiers in the same name space with overlapping visibility should be typographically unambiguous

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.5

Service MC3R1.D4.7: If a function returns error information, then that error information shall be tested

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.7

Service MC3R1.D4.8: If a pointer to a structure or union is never dereferenced within a translation unit, then the implementation of the object should be hidden

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.8

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)"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.9

Service MC3R1.D4.10: Precautions shall be taken in order to prevent the contents of a header file being included more than once

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.10

Service MC3R1.D4.11: The validity of values passed to library functions shall be checked

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.11

Service MC3R1.D4.12: Dynamic memory allocation shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.12

Service MC3R1.D4.13: Functions which are designed to provide operations on a resource should be called in an appropriate sequence

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.13

Service MC3R1.D4.14: The validity of values received from external sources shall be checked

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.D4.14

Service MC3R1.R1.1: The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limits

  1. tag

    1. BUGSENG's proposed addition to the selection.

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R1.1

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)$)"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R1.2

Service MC3R1.R1.3: There shall be no occurrence of undefined or critical unspecified behaviour

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R1.3

Service MC3R1.R1.4: Emergent language features shall not be used

  1. tag

    1. BUGSENG's proposed addition to the selection.

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R1.4

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)))))"}
  3. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R2.1

Service MC3R1.R2.2: There shall be no dead code

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R2.2

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()))"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R2.3

Service MC3R1.R2.6: A function should not contain unused label declarations

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R2.6

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)"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R2.7

Service MC3R1.R3.1: The character sequences `/*' and `//' shall not be used within a comment

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R3.1

Service MC3R1.R3.2: Line-splicing shall not be used in `//' comments

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R3.2

Service MC3R1.R4.1: Octal and hexadecimal escape sequences shall be terminated

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R4.1

Service MC3R1.R4.2: Trigraphs should not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R4.2

Service MC3R1.R5.1: External identifiers shall be distinct

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R5.1

Service MC3R1.R5.2: Identifiers declared in the same scope and name space shall be distinct

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R5.2

Service MC3R1.R5.3: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R5.3

Service MC3R1.R5.4: Macro identifiers shall be distinct

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R5.4

Service MC3R1.R5.5: Identifiers shall be distinct from macro names

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R5.5

Service MC3R1.R5.6: A `typedef' name shall be a unique identifier

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R5.6

Service MC3R1.R5.7: A tag name shall be a unique identifier

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R5.7

Service MC3R1.R5.8: Identifiers that define objects or functions with external linkage shall be unique

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R5.8

Service MC3R1.R5.9: Identifiers that define objects or functions with internal linkage should be unique

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R5.9

Service MC3R1.R6.1: Bit-fields shall only be declared with an appropriate type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R6.1

Service MC3R1.R6.2: Single-bit named bit fields shall not be of a signed type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R6.2

Service MC3R1.R7.1: Octal constants shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R7.1

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$))))"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R7.2

Service MC3R1.R7.3: The lowercase character `l' shall not be used in a literal suffix

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R7.3

Service MC3R1.R7.4: A string literal shall not be assigned to an object unless the object's type is "pointer to `const'-qualified `char'"

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R7.4

Service MC3R1.R8.1: Types shall be explicitly specified

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.1

Service MC3R1.R8.2: Function types shall be in prototype form with named parameters

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.2

Service MC3R1.R8.3: All declarations of an object or function shall use the same names and type qualifiers

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.3

Service MC3R1.R8.4: A compatible declaration shall be visible when an object or function with external linkage is defined

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.4

Service MC3R1.R8.5: An external object or function shall be declared once in one and only one file

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.5

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 property `weak'.

        -config=MC3R1.R8.6,declarations+={safe,"property(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/.*$)))"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.6

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_.*$"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.8

Service MC3R1.R8.9: An object should be defined at block scope if its identifier only appears in a single function

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.9

Service MC3R1.R8.10: An inline function shall be declared with the `static' storage class

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.10

Service MC3R1.R8.12: Within an enumerator list, the value of an implicitly-specified enumeration constant shall be unique

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.12

Service MC3R1.R8.14: The `restrict' type qualifier shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R8.14

Service MC3R1.R9.1: The value of an object with automatic storage duration shall not be read before it has been set

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R9.1

Service MC3R1.R9.2: The initializer for an aggregate or union shall be enclosed in braces

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R9.2

Service MC3R1.R9.3: Arrays shall not be partially initialized

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R9.3

Service MC3R1.R9.4: An element of an object shall not be initialized more than once

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R9.4

Service MC3R1.R9.5: Where designated initializers are used to initialize an array object the size of the array shall be specified explicitly

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R9.5

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()"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R10.1

Service MC3R1.R10.2: Expressions of essentially character type shall not be used inappropriately in addition and subtraction operations

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R10.2

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}
  3. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R10.3

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())"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R10.4

Service MC3R1.R10.5: The value of an expression should not be cast to an inappropriate essential type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R10.5

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}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R10.6

Service MC3R1.R10.7: If a composite expression is used as one operand of an operator in which the usual arithmetic conversions are performed then the other operand shall not have wider essential type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R10.7

Service MC3R1.R10.8: The value of a composite expression shall not be cast to a different essential type category or a wider essential type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R10.8

Service MC3R1.R11.2: Conversions shall not be performed between a pointer to an incomplete type and any other type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R11.2

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 an unevaluated expressions.

        -config=MC3R1.R11.6,casts={hide, "context(unevaluated())"}
  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)))))"}
  3. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R11.6

Service MC3R1.R11.7: A cast shall not be performed between pointer to object and a non-integer arithmetic type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R11.7

Service MC3R1.R11.8: A cast shall not remove any `const' or `volatile' qualification from the type pointed to by a pointer

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R11.8

Service MC3R1.R11.9: The macro `NULL' shall be the only permitted form of integer null pointer constant

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R11.9

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}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R12.1

Service MC3R1.R12.2: The right hand operand of a shift operator shall lie in the range zero to one less than the width in bits of the essential type of the left hand operand

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R12.2

Service MC3R1.R12.4: Evaluation of constant expressions should not lead to unsigned integer wrap-around

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R12.4

Service MC3R1.R12.5: The `sizeof' operator shall not have an operand which is a function parameter declared as "array of type"

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R12.5

Service MC3R1.R13.1: Initializer lists shall not contain persistent side effects

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R13.1

Service MC3R1.R13.2: The value of an expression and its persistent side effects shall be the same under all permitted evaluation orders

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R13.2

Service MC3R1.R13.3: A full expression containing an increment (`++') or decrement (`--') operator should have no other potential side effects other than that caused by the increment or decrement operator

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R13.3

Service MC3R1.R13.4: The result of an assignment operator should not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R13.4

Service MC3R1.R13.5: The right hand operand of a logical `&&' or `||' operator shall not contain persistent side effects

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R13.5

Service MC3R1.R13.6: The operand of the `sizeof' operator shall not contain any expression which has potential side effects

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R13.6

Service MC3R1.R14.1: A loop counter shall not have essentially floating type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R14.1

Service MC3R1.R14.2: A `for' loop shall be well-formed

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R14.2

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)))"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R14.3

Service MC3R1.R14.4: The controlling expression of an `if' statement and the controlling expression of an iteration-statement shall have essentially Boolean type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R14.4

Service MC3R1.R15.2: The `goto' statement shall jump to a label declared later in the same function

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R15.2

Service MC3R1.R15.3: Any label referenced by a `goto' statement shall be declared in the same block, or in any block enclosing the `goto' statement

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R15.3

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\\)$))"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R15.6

Service MC3R1.R15.7: All `if ... else if' constructs shall be terminated with an `else' statement

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R15.7

Service MC3R1.R16.1: All `switch' statements shall be well-formed

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R16.1

Service MC3R1.R16.2: A switch label shall only be used when the most closely-enclosing compound statement is the body of a `switch' statement

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R16.2

Service MC3R1.R16.3: An unconditional `break' statement shall terminate every switch-clause

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R16.3

Service MC3R1.R16.4: Every `switch' statement shall have a `default' label

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R16.4

Service MC3R1.R16.5: A `default' label shall appear as either the first or the last switch label of a `switch' statement

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R16.5

Service MC3R1.R16.6: Every `switch' statement shall have at least two switch-clauses

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R16.6

Service MC3R1.R16.7: A switch-expression shall not have essentially Boolean type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R16.7

Service MC3R1.R17.1: The features of `<stdarg.h>' shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R17.1

Service MC3R1.R17.2: Functions shall not call themselves, either directly or indirectly

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R17.2

Service MC3R1.R17.3: A function shall not be declared implicitly

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R17.3

Service MC3R1.R17.4: All exit paths from a function with non-void return type shall have an explicit `return' statement with an expression

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R17.4

Service MC3R1.R17.5: The function argument corresponding to a parameter declared to have an array type shall have an appropriate number of elements

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R17.5

Service MC3R1.R17.6: The declaration of an array parameter shall not contain the `static' keyword between the `[ ]'

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R17.6

Service MC3R1.R17.7: The value returned by a function having non-void return type shall be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R17.7

Service MC3R1.R18.1: A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R18.1

Service MC3R1.R18.2: Subtraction between pointers shall only be applied to pointers that address elements of the same array

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R18.2

Service MC3R1.R18.3: The relational operators `>', `>=', `<' and `<=' shall not be applied to objects of pointer type except where they point into the same object

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R18.3

Service MC3R1.R18.5: Declarations should contain no more than two levels of pointer nesting

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R18.5

Service MC3R1.R18.6: The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R18.6

Service MC3R1.R18.8: Variable-length array types shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R18.8

Service MC3R1.R19.1: An object shall not be assigned or copied to an overlapping object

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R19.1

Service MC3R1.R20.2: The `'', `"' or `\' characters and the `/*' or `//' character sequences shall not occur in a header file name

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.2

Service MC3R1.R20.3: The `#include' directive shall be followed by either a `<filename>' or `"filename"' sequence

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.3

Service MC3R1.R20.4: A macro shall not be defined with the same name as a keyword

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.4

Service MC3R1.R20.6: Tokens that look like a preprocessing directive shall not occur within a macro argument

  1. tag

    1. BUGSENG's proposed addition to the selection.

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.6

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)$"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.7

Service MC3R1.R20.8: The controlling expression of a `#if' or `#elif' preprocessing directive shall evaluate to 0 or 1

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.8

Service MC3R1.R20.9: All identifiers used in the controlling expression of `#if' or `#elif' preprocessing directives shall be #define'd before evaluation

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.9

Service MC3R1.R20.11: A macro parameter immediately following a `#' operator shall not immediately be followed by a `##' operator

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.11

Service MC3R1.R20.12: A macro parameter used as an operand to the `#' or `##' operators, which is itself subject to further macro replacement, shall only be used as an operand to these operators

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.12

Service MC3R1.R20.13: A line whose first token is `#' shall be a valid preprocessing directive

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.13

Service MC3R1.R20.14: All `#else', `#elif' and `#endif' preprocessor directives shall reside in the same file as the `#if', `#ifdef' or `#ifndef' directive to which they are related

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R20.14

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,"^_.*$"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.1

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,"^(.*::)?_.*$"}
  2. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.2

Service MC3R1.R21.3: The memory allocation and deallocation functions of `<stdlib.h>' shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.3

Service MC3R1.R21.4: The standard header file `<setjmp.h>' shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.4

Service MC3R1.R21.5: The standard header file `<signal.h>' shall not be used

  1. tag

    1. BUGSENG's proposed addition to the selection.

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.5

Service MC3R1.R21.6: The Standard Library input/output functions shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.6

Service MC3R1.R21.7: The Standard Library functions `atof', `atoi', `atol' and `atoll' of `<stdlib.h>' shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.7

Service MC3R1.R21.8: The Standard Library termination functions of `<stdlib.h>' shall not be used

  1. tag

    1. BUGSENG's proposed addition to the selection.

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.8

Service MC3R1.R21.9: The Standard Library functions `bsearch' and `qsort' of `<stdlib.h>' shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.9

Service MC3R1.R21.11: The standard header file `<tgmath.h>' should not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.11

Service MC3R1.R21.12: The standard header file `<fenv.h>' shall not be used

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.12

Service MC3R1.R21.13: Any value passed to a function in `<ctype.h>' shall be representable as an `unsigned char' or be the value EOF

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.13

Service MC3R1.R21.14: The Standard Library function `memcmp' shall not be used to compare null terminated strings

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.14

Service MC3R1.R21.15: The pointer arguments to the Standard Library functions `memcpy', `memmove' and `memcmp' shall be pointers to qualified or unqualified versions of compatible types

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.15

Service MC3R1.R21.16: The pointer arguments to the Standard Library function `memcmp' shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.16

Service MC3R1.R21.17: Use of the string handling functions from `<string.h>' shall not result in accesses beyond the bounds of the objects referenced by their pointer parameters

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.17

Service MC3R1.R21.18: The `size_t' argument passed to any function in `<string.h>' shall have an appropriate value

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.18

Service MC3R1.R21.19: The pointers returned by the Standard Library functions `localeconv', `getenv', `setlocale' or, `strerror' shall only be used as if they have pointer to const-qualified type

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.19

Service MC3R1.R21.20: The pointer returned by the Standard Library functions `asctime', `ctime', `gmtime', `localtime', `localeconv', `getenv', `setlocale' or `strerror' shall not be used following a subsequent call to the same function

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.20

Service MC3R1.R21.21: The Standard Library function `system' of `<stdlib.h>' shall not be used

  1. tag

    1. BUGSENG's proposed addition to the selection.

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R21.21

Service MC3R1.R22.1: All resources obtained dynamically by means of Standard Library functions shall be explicitly released

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.1

Service MC3R1.R22.2: A block of memory shall only be freed if it was allocated by means of a Standard Library function

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.2

Service MC3R1.R22.3: The same file shall not be open for read and write access at the same time on different streams

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.3

Service MC3R1.R22.4: There shall be no attempt to write to a stream which has been opened as read-only

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.4

Service MC3R1.R22.5: A pointer to a `FILE' object shall not be dereferenced

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.5

Service MC3R1.R22.6: The value of a pointer to a `FILE' shall not be used after the associated stream has been closed

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.6

Service MC3R1.R22.7: The macro `EOF' shall only be compared with the unmodified return value from any Standard Library function capable of returning `EOF'

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.7

Service MC3R1.R22.8: The value of `errno' shall be set to zero prior to a call to an errno-setting-function

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.8

Service MC3R1.R22.9: The value of `errno' shall be tested against zero after calling an errno-setting-function

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.9

Service MC3R1.R22.10: The value of `errno' shall only be tested when the last function to be called was an errno-setting-function

  1. tag

    1. See https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html

      As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC3R1.R22.10

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}