Undetected error in array declarations...

Craig Burley burley@gnu.org
Sat Dec 5 10:46:00 GMT 1998


>:     A feature to report any failure to conform to ANSI C might be
>:     useful in some instances, but would require considerable
>:     additional work and would be quite different from `-pedantic'.  We
>:     recommend, rather, that users take advantage of the extensions of
>:     GNU C and disregard the limitations of other compilers.  Aside
>:     from certain supercomputers and obsolete small machines, there is
>:     less and less reason ever to use any other C compiler other than
>:     for bootstrapping GNU CC.
>
>  To a certain extent I think the attitude "take advantage of our 
>extensions and disregard other products" is bad.  The second paragraph 

"Bad" is an overstatement, given the context: the text makes it clear
that there's a balance to be struck here.

If you want a `-really-pedantic' option (for example), nothing prevents
you from doing the work yourself (or paying to have it done) and
sharing the results with others, including the distributors of gcc.

What the text tries to do, AFAICT, is pro-actively prevent some people
from complaining that gcc doesn't already solve this problem for them,
by implying that the various roles of Project GNU do not include providing
a means to guarantee 100% conformance with existing standards (often
designed by vendors of proprietary software to mitigate the significant
technical disadvantages incurred by not shipping, and allowing sharing
of, the source code).

>sounds very close to "embrace, extend, extinguish" but from a very 
>different source (using public standards (ANSI C), adding extensions, 
>encouraging users to rely on the extensions ;).

More about that odious comparison later.

>Standards are good, 
>extensions are dangerous but only when they can not be disabled.

Generally, I agree with that.  I don't think you can conclude that
Project GNU therefore must be responsible for ensuring that all of
its products are capable of imposing pure standards conformance, though.
Just because something is "good" does not mean GNU must provide it.

People concerned about that sort of thing are *usually* most concerned
about ensuring the continued viability of some proprietary products,
and in any case, nothing prevents them from modifying GNU software
to suit their needs.

*My* problem with the attitude that "gcc [or whatever] is ubiquitous,
so you might as well use its extensions" is that the extensions are
not always (perhaps rarely) well-designed in the first place.  When
their faults include a programmer's misunderstanding what code using
the extension actually means (when that programmer is unacquainted
with the extension itself), that's a strong indication that, at the
very least, `-pedantic' should diagnose the use of such extensions.

>  While variable sized arrays can be flagged as a warning or error,
>that excerpt says to me, that there are extensions have no warnings,
>that can not be disabled, and the combination of these is not considered
>a problem.  I think that extensions that silently creep in are evil.

Proprietary vendors would tend to agree, especially when "source
code is available and freely shareable" is considered an "extension".

>  I think there should be an easy option to force ANSI compliance 
>and disable all GNU extensions, or at the very least issue a warning
>about any extensions in use.  So that people who choose to (for whatever
>reason) have the option to detect problems.  But I don't have the 
>knowledge to add this option, and I doubt many people who do see any 
>value in it.

I do see value in it, and probably others who could do the work do as
well, but there are *many* more important things to work on.

Remember, Project GNU is actually *contributed* to almost exclusively
by people who see free software as at least an alternative, if not
a preferred, option to proprietary software.  Even preserving its
viability as an *alternative* seems to require substantial effort
to keep it competitive in its various marketplaces, at least to have
a counterargument to the continuing efforts of the proprietary software
industry to use legislation to keep raising artificial barriers to
developers of non-proprietary software.  (This has already happened,
and is continuing to happen, in the music industry.  Had there been
a flourishing free-music industry 10 years ago like there is a free-
software industry today, the DAT tax and, perhaps, SCMS might never
have happened.  The result would likely be a lower cost of entry for
people recording new music they composed themselves, something that is,
arguably, much more precious to musicians than to programmers, given
the typical financial states of both.  Instead, we have artificial
barriers substantially increasing the costs of recording and sharing
music at the amateur and nearly-pro level in the recording industry,
so people actually pay more to buy blank tapes, the extra money going
to multi-millionaires like Madonna and her record company's executives,
and pay more for SCMS in their recording equipment, which prevents them
from making faithful copies of their *own* performances of their *own*
compositions.  I get these impressions these billion-dollar artifical
barriers have done little to stop actual piracy, their supposed targets,
which is why the recording industry is going for even more, steeper,
and costlier barriers in the future.  Given what Sony/CBS et al have been
able to accomplish in the legislatures worldwise, just imagine what
Microsoft et al could achieve if there was essentially no viable free-
software industry -- no articles about Linux, Project GNU, Apache, and
so on.  Instead, with those articles, the industry-created hysteria
over piracy seems to have taken a back seat, along with totalitarian
plans for preventing people copying software...for the time being.)

So, even contributors who just want to make sure GNU, and free software
in general, remains a viable alternative, recognize the importance of
keeping it within some kind of "striking distance" of whatever the
proprietary vendors provide at any given time.

These people tend to recognize the existence of an ongoing battle for
"mind-share" among contributors *and* users -- a battle against the
vendors of proprietary software, who have, perhaps until recently,
conducted a successful PR campaign to convince the buying public that
the only good software is strictly licensed, binary-only, shrink-
wrapped software.  (For example, a blurb on the front page of a Wall
Street Journal article a couple of months ago suggested that this
Open Source[TM] stuff was worrisome because it is more prone to
viruses.  The fact is, software you can get as, and build from, source
is *less* prone to containing viruses, but some proprietary vendors,
and their friends, have apparently spread FUD indicating otherwise.)

Among the weapons of choice of that battle, which includes battles
among the proprietary vendors themselves, are "new features".

Rarely is "has the capability to deny use of new features" proved
worthwhile as a weapon in this battle.  (That's unfortunate, IMO.
For example, there are plenty of so-called "web sites" I cannot
access using my browser of choice, `lynx', because, even though they
contain plenty of text I *could* read, they apparently authored those
pages using Microsoft or Netscape software.  I know *first-hand* how
little those "in power" at Microsoft care about fixing that -- to them
it is a laughable issue that people composing web pages *automatically*,
that is, by default, compose pages that can be read by any browser.
They completely disregard the fact that the whole "Web" concept *includes*
"composer of content does not care what browser user chooses".  After
all, the only people they care about are, supposedly, their "customers,
which includes anyone forced to use their products to obtain
information that *could* have trivially been provided in a vendor-
neutral fashion.)

But comparing the approach used by Project GNU to the "embrace and
extend" tactics of companies like Microsoft is like comparing the
faint whiff of some person's natural gaseous emissions to the
Chernobyl disaster.  You can easily live with the former, but not
the latter.  The former actually involves little personal responsibility
for the problem, the latter involved lots of failures of people in
positions of power to act responsibly.  And you can even *fix* GNU
software to diagnose use of extensions to the extent you want, an option
that is, AFAIK, not provided by proprietary vendors.  (At least, I am
not aware that Netscape has released its Web-page composition product
as Open Source[TM] code, and I'm pretty sure Microsoft hasn't done so
for its product.)

IMO, "has the capability to deny use of new features" *is* worthwhile
as a weapon in the battle against broken hardware and software systems,
which is why I'd like to see more people who claim to want the option of
strict conformance in GNU actually step forward and make it happen, rather
than just complain about it.  Coding ability is not required -- funding
is a fine substitute.

        tq vm, (burley)



More information about the Gcc-bugs mailing list