Giter Site home page Giter Site logo

Comments (5)

bob-beck avatar bob-beck commented on August 24, 2024

What platform is this a problem on?

from portable.

kinichiro avatar kinichiro commented on August 24, 2024

Hi,
HP-UX 11.31 itanium without gcc.
Thanks.

from portable.

kinichiro avatar kinichiro commented on August 24, 2024

I created short sample program.

/* array.c */
#include <stdio.h>
int main(void) {
    int i, val[10] = {};
    for(i = 0; i < 10; ++ i)
        printf("val[%d] = %d\n", i, val[i]);
}

I got compilation error in HP-UX 11.31.

# cc array.c
"array.c", line 3: error #2029: expected an expression
      int i, val[10] = {};
                        ^

But I could succeed to compile this with -Agcc switch (=gcc partial support) in HP-UX 11.31.

# cc -Agcc array.c

In linux environment with gcc, no problem.

# gcc array.c

Changing array initialization code like "val[10] = {0};", solve this issue.
But I'm not sure that this issue occurs or not in other platform without gcc.

Thanks.

from portable.

busterb avatar busterb commented on August 24, 2024

This trivial fix will be easy to merge post-freeze in the openbsd tree, though clang and gcc are our main target compilers at the moment.

from portable.

busterb avatar busterb commented on August 24, 2024

Fixed, thanks.

from portable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.