c/10406: Suggestion for variable attribute "default"

Wolfgang Bangerth bangerth@ices.utexas.edu
Mon Apr 14 22:24:00 GMT 2003


> It is at least same unimportant as some other attributes like
> transparent_union, unused, deprecated or weak.

Attribute unused is used in cases where in C++ you can write
  void f(int /*p*/) {
    ...; /* doesn't use p, but did in the past; we don't want to change 
            the prototype, though */
  }
which you can't do in C.

Deprecated was deemed useful enough to be included into the Java standard.

Attribute weak changes the semantics of a function w.r.t. the linker.

That being said, it might well be that some of the attributes are useless. 
That should not tempt us into creating more uselessness, though.

IMHO, your proposal is absolutely useless, since
- one can get the same effect with a minimal change
- it would have a ridiculously far-reaching impact since it would 
  essentially introduce overloading assignment operators in C.

Wolfgang (certain to speak for the wider GCC community here)

-------------------------------------------------------------------------
Wolfgang Bangerth              email:            bangerth@ices.utexas.edu
                               www: http://www.ices.utexas.edu/~bangerth/




More information about the Gcc-bugs mailing list