Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ploticus] Source build question

Expand Messages
  • Joshua Simons
    As a follow-up on this, I believe now that gcc is in error when it complains about this code. There is traffic on the gcc aliases about exactly this
    Message 1 of 4 , Jul 24, 2007
      As a follow-up on this, I believe now that gcc is in error when it
      complains about this code. There is traffic on the gcc aliases
      about exactly this regression. Nonetheless, it is easy to 
      work around this issue by either adding static to one
      declaration or dropping it from the other, depending on the
      desired effect.

      Josh

      On Jul 20, 2007, at 2:35 PM, Joshua Simons wrote:

      Steve:


      The latest version of Xcode uses gcc 4.0.1. I think you are correct that 
      3.x versions of gcc will compile the code correctly.

      In gd13.c, the actual arrays in question are sint and cost. The change
      is trivial--the issue is that each array is declared both with external
      and file linkage in that file. Unless you explicitly need to define those
      arrays with file scope (for example, if this code is used as a library to
      be called by arbitrary user code), the simplest solution is to remove
      the 'static' storage-class specifier from the array declarations.

      I'll hack up a version that compiles for me and see if I can find the
      corruption problem I reported.

      Josh

      On Jul 20, 2007, at 12:09 PM, Stephen C. Grubb wrote:

      Josh,

      I (and just about everyone else) uses gcc, but gcc changes (and tends to
      get more strict) over time.

      Is the code you include here real? I can't find it in my gd13.c

      Maybe if you send me the actual code that's giving the error I can suggest
      a change that would get around your gcc's complaint.

      -Steve

      On Wed, 18 Jul 2007, Joshua Simons wrote:

      >
      > I'm trying to build Ploticus 2.33 from source on Mac OS using gcc. It
      > fails with a compilation error
      > in gd13.c because there are two arrays declared first as static and
      > then later non-static.
      >
      > For example,
      >
      > static int a[] ;
      >
      > followed by
      >
      > int a[] = { 1, 2, 3} ;
      >
      > My C is a little rusty, but that error message seems legitimate.
      >
      > Which leaves me wondering which C compilers will compile Ploticus
      > successfully?
      >
      > Josh Simons
      >
      >
      >

      Stephen C. Grubb scg@... x-6633
      Scientific Software Engineer, The Jackson Laboratory
      600 Main Street Bar Harbor, Maine 04609 USA




    Your message has been successfully submitted and would be delivered to recipients shortly.