This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Additional features for -fms-extensions


Schönbeck, Andreas wrote:

> + An ellipsis does not take variables of non-POD type as arguments:

I believe the patch is not safe. It might work for some limited case of
semi-POD classes (for instance, classes without destructors, or classes
without virtual members), but I would like to know if this does not
introduce cases where we abort later. Maybe an ABI expert can comment on
this.

If we can isolate some kind of classes for which it is always correct, we
could isolate the extension to those cases only.


> + When passing a lvalue to a function which wants to take a reference
there
> is an error thrown:

I have bad gut feelings about this as well. This is a very delicate area of
the standard, so I do not know if this works well in complex overload &
template contexts. Nathan knows something about this for sure. Of course, it
could be argued that you get what you ask for, so if the compiler then hangs
or segfaults on complex testcases you should not use -fms-extensions :)


> + When declaring something extern and later static an error is thrown

I do not know about this. Maybe other declaration experts can comment on
side effects of this.


> + When declaring a not-anonymous union within an anonymous union an error
is
> thrown
> + When declaring something extern and later static an error is thrown

These are feasable AFAICT.


> + The address of a member of a packed struct can't be retrieved

I believe this could be a problem for platforms which do not support
unaligned memory accesses. In this case, it would make sense to restrict the
extensions to the platform where it works (like x86).


As a general annotation, you should provide also new testcases in DejaGnu
format which test the new extensions, and also provide a patch to the
documentation.

Giovanni Bajo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]