Re: C++ types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Karl Larsen wrote:

I was told there is only one kind of C++ in Linux. I was surprised and looked at man gcc and direct that person to the section headed:

   Options Controlling C Dialect

      The following options control the dialect of C (or languages derived
      from C, such as C++, Objective-C and Objective-C++) that the compiler
      accepts:

Unfortunately only one of these is C++[1][2].  By dialect they mean
the standard used for each one.  In C mode that means whether to
support the C90 or C99 standards and whether gnu and other extensions
to the language should be supported.  Which can have interesting
effects on the availability of GNU or Posix functions like getopt.
The C++ mode will do the equivalent for that language.

      -ansi
          In C mode, support all ISO C90 programs.  In C++ mode, remove GNU
          extensions that conflict with ISO C++.


This is what I was in referance to. I wonder what C Dialect Windows uses?


MS own dialect.  They tend to choose (particularly with C++) what
bits to support and what not to and like all other compiler vendors
will provide their own extensions.  Further support varies between
the different versions.  Visual C++ 6 was notorious for some bits
of its C++ support, though many of these were later patched.

I can only really speak about C, not C++, but in both MS and GCC
compilers support for the latest version of the C99 standard is not
complete (N.B. that some parts will require support in the
underlying library, glibc for GNU).  Some parts of the standard are
implemented as extensions.

The best way to stay safe in terms of portability is to stick to
the published standard and run your compiler in conforming mode,
but often confounding factors will make this difficult.

[1] Attempts to treat C++ as a superset of C eventually lead to pain.
[2] Objective-C++?  I'd like some of whatever they're having please.

--
imalone

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux