Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8308031

Linkers should reject unpromoted variadic parameters

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • core-libs
    • None

      The C spec mandates that variadic arguments smaller than int are promoted to int, and float arguments are promoted to double.

      See: https://en.cppreference.com/w/c/language/conversion#Default_argument_promotions

      Currently however, most linkers happily link variadic arguments of sub-int types or float.

      We should explicitly reject these types, since they are not officially supported.

            jvernee Jorn Vernee
            jvernee Jorn Vernee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: