Bison version 1.875

mpprpp@yahoo.com (Kevin)
29 May 2003 03:29:27 -0400

          From comp.compilers

Related articles
Bison version 1.875 mpprpp@yahoo.com (2003-05-29)
Re: Bison version 1.875 haberg@matematik.su.se (2003-06-03)
| List of all articles for this month |

From: mpprpp@yahoo.com (Kevin)
Newsgroups: comp.compilers
Date: 29 May 2003 03:29:27 -0400
Organization: http://groups.google.com/
Keywords: question
Posted-Date: 29 May 2003 03:29:27 EDT

I'm trying to install Bison version 1.875 on my Sun Solaris (2.6), but
I'm running into a problem when I try the "make" command. I get the
following error message.


"abitset.c ", line 787: bitset_union: argument mismatch
"abitset.c ", line 787: bitset_union: argument mismatch
"abitset.c ", line 788: bitset_union: argument mismatch
"abitset.c ", line 788: bitset_union: argument mismatch
"abitset.c ", line 787: syntax error before or at: (
"abitset.c ", line 788: warning: syntax error: empty declaration
"abitset.c ", line 789: cannot recover from previous errors


I'm not a C expert, so I don't know what the problem is, but the next
2 lines is where I'm having the problem.


    size_t header_size = offsetof (struct bitset_union, a.words);
    struct bitset_align_struct { char a; union bitset_union b; };


Here is the section of code:


size_t
abitset_bytes (bitset_bindex n_bits)
{
    bitset_windex size;
    size_t bytes;
    size_t header_size = offsetof (struct bitset_union, a.words);
    struct bitset_align_struct { char a; union bitset_union b; };
    size_t bitset_alignment = offsetof (struct bitset_align_struct, b);


    size = ABITSET_N_WORDS (n_bits);
    bytes = header_size + size * sizeof (bitset_word);


    /* Align the size properly for a vector of abitset objects. */
    if (header_size % bitset_alignment != 0
            || sizeof (bitset_word) % bitset_alignment != 0)
        {
            bytes += bitset_alignment - 1;
            bytes -= bytes % bitset_alignment;
        }


    return bytes;
}


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.