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

Compilation fails on multiVis.c using gcc4.4.6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u222
    • infrastructure
    • None
    • x86
    • linux

      An atttempt to compile jdk/src/solaris/native/sun/awt/multiVis.c with gcc4.4.6 fails with
      ```
      405:error: 'for' loop initial declarations are only allowed in C99 mode
      405:note: use option -std=c99 to -std=gnu99 to compile your code
      ```
      gcc4.4.6 is currently the default on Amazon Linux.

      The simplest solution seems to be to add -std=c99 to CCXXFLAGS_JDK for gcc.

            phh Paul Hohensee
            phh Paul Hohensee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: