Unable to prevent inheritance in CC compiler

On Solaris Studio 12.2's C++ compiler (CC), this runs without errors:
class Base;
class Baselock {
   friend class Base;
   Baselock() {cout<<"Constructor to Baselock"<<endl; }
class Base : virtual Baselock {
public:
   Base() {cout<<"Constructor to Base"<<endl; }
class Derived : public Base {
public:
   Derived() {cout<<"Constructor to Derived"<<endl; }
int main() {
   Derived D;
   return 0;
}By ISO C++ standards, an object of class "Derived" cannot be created, as it does not have access to "Baselock"'s constructor. This is an indirect procedure to prevent inheritance of a base class. In g++ as well as VC++, as expected, we get the error "Baselock::Baselock() is not accessible in this (Derived's object's) context". But we don't get error on CC compiler.
What can be the intended purpose of such a behavior?
Edited by: user9546596 on Jan 3, 2011 1:34 AM
Edited by: user9546596 on Jan 3, 2011 4:46 AM

The compiler warns about access under the +w (additional warnings) option.
Originally, the compiler made this access an error. We found that some popular compilers accepted similar code, and that some Open Source code failed to compile. We reduced the error to an optional warning.
With popular compilers now making this access an error, we can revisit our earlier decision only to warn about the code. Please file a bug report on the C++ compiler at http://bugs.sun.com so we have a record of the request.
In the mean time you can convert this warning to an error, but unfortunately not very conveniently.
Add the +w option so the compiler generates this warning, along with possibly other warnings, depending on  your code, and add the -errtags option. Each warning will display a tag. Example:
% CC +w -errtags z.cc
"z.cc", line 16: Warning, vbcinaccess: The constructor/destructor Baselock::Baselock()
of indirect virtual base class is not accessible from Derived::Derived().
1 Warning(s) detected. Now you can use -errwarn=<tag> to convert a warning into an error, and -erroff=<tag> to turn off a warning.
% CC +w -errwarn=vbcinaccess z.cc
"z.cc", line 16: Error: The constructor/destructor Baselock::Baselock()
of indirect virtual base class is not accessible from Derived::Derived().
1 Error(s) detected. Related bug reports:
6566513 compiler fails to generate the expected failure from the negative test case
6841693 Need liberalization of too strong accessibility control after fix for 6566513

Similar Messages

  • Unable to connect to the fpga compile server

    Hi, I keep getting the following message when trying to compile my FPGA code -> LabVIEW FPGA was unable to connect to the FPGA compile server.... System configuration: Win 7 64LV 2009 (32 bit) SP1LV FPGA 2009 SP1cRIO 90249114 Chassis I am developing and compiling on the same machine with the cRIO attached through a wired router. I've tried repairing the FPGA installation with no changes.  The attached screen shots are displayed in the order they are pasted Any insight would be appreciated - thanks in advance!

    I appear to be having similar difficulties with compiling a FPGA VI remotely with LabVIEW 2010.
    The remote compilation server is a PC running XP 64 bit. I have configured the compilation worker to allow remote connections and it lists it registered capabilities as Xilinx 10.1, Xilinix 11.5 and Xilinx 11.5 (64-bit). This can be seen in the attached png.
    My development system is running XP 32 bit with LabVIEW 2010. It is connected to the server via a local area network.
    The process I have been following is as follows;
    1.) Log onto the server PC and start the compile worker (this is either physically or by connecting via remote desktop and then disconnecting but leaving the PC logged in with compile worker on)
    2.) Set up the FPGA compilation settings on the development computer to be the server (hostname, domain\username, password)
    3.) Try and rebuild the target VI
    I then receive an error stating that the user name is too long or invalid (see png).
    I have set the exceptions in the server firewall to allow port 96 as I found that this is the default port used for earlier version of the compile server but I am unsure if this is applicable in 2010. I need to check with my IT services that exceptions I add are actually applied.
    If I go into the compile worker settings on my development PC and try and set them to that of the compile server then it also fails to connect.

  • How can I prevent inheritance without marking a class final?

    Could u pls help on this

    Making it a pain in the ass to inherit from your
    class doesn't equate to preventing inheritance.
    You can still override a private constructor, you
    just can't call it from the derived class.How do you want to override ANY constructor??? :-) Constructors are not overriden just called!
    No, you CANNOT extend a class, which only provides private constructors!
    -Puce

  • Unable to use Titles- will not compile or render titles (preview or export)

    I have been unable to insert titles in Premiere Pro CC. I just installed it yesterday, and everything seems to work except when I try and insert titles using PPro's internal Titler. The preview line above the title (and only the title) remains red and when rendering the preview a "Error compiling movie: Unknown error" pops up. When exporting, once it gets to the title, it will also stop the render with the same error. If I remove the title, it renders fine. When creating a new Title, I have made sure that the pixel size, etc. is the same as the rest of the project. Occasionally, I can make a modification to the title and it will display properly in the preview window, temporarily. Once I take some other action even as minor as saving the project, the title will revert to its failed state. In this state, it won't render and when playing the preview, the image will freeze on the last frame before the title and once it is past the title, the video continues. It is a simple rolling title for end credits. If the title is temporarily working in the preview window, it will also work in the project box. However, when the title is in its failed state, the thumbnail in the project window also does not work. Click it gives that multi-language media rednering screen. Double clicking the titles anywhere brings up the Title editor screen and everything appears fine. The screenshot below shows the error after trying to render the preview of the title. I tried disabling the CUDA acceleration (I have a GTX770 card) with no change. I have also tried various file formats in the export to no avail as copying and pasting into a new sequence to no avail. The C: drive has over 70GB free and the disk with the scratch files has over 170GB free. Any help would be greatly appreciated. Thanks.
    Rob

    I am still having the problems with it however I will have to re-create the test case as I accidentally cleaned it out when I cleaned up my APEX space at oracle's public server. I will rebuild the test case and post a link later today.

  • Unable to find framedyn.dll when compiling VI for fpga

    When trying to compile an FPGA on cRIO, a window with the following message popped up: unable to find framedyn.dll.  How can I resolve this and compile the VI?

    I just had this problem and NI Help was able to solve the issue.  It is actually a windoze enviroment variable problem. 
    See http://support.microsoft.com/kb/319114
    regards
    MDDAve
    CLA
    Visualize the Solution
    CLA
    LabVIEW, LabVIEW FPGA

  • Ps CS6 Problem: unable to prevent uncompressed compatibility image being saved in 32-bpc docs

    Ps CS6
    OS X 10.6.8
    There seems always to be an uncompressed compatibility image in 32-bit PSD and PSB, and in 32-bit layered TIFF. That's regardless of Maximum Compatibility being disabled when saving.
    If Maximum Compatibility is enabled, there correctly is an uncompressed composite in the file.
    If Maximum Compatibility is disabled, there's an overhead equivalent to an uncompressed image with the document's size. I reckon the all-white compatibility image is uncompressed! If any image should be compressed, that surely is it. What a ridiculous waste of storage space. An unnecessary consumption of hundreds of MB per document in many cases.
    This uncompressed compatibility image would explain why an embedded 32-bit PSB which stores the IBL of a 3D Layer consumes the enormous storage of a large uncompressed 32-bit image despite it being compressible to a few hundred KB.
    If I've missed some switch to prevent this waste of storage, please point me to it. Otherwise, please employ compression when appropriate.

    That is correct - without that, many other applications fail to read the file.
    We think we've got a way to compress even the solid color data in 32 bit/channel, but it wasn't as straightforward as it sounds (floating point is tricky).

  • Unable to configure/build using studio12u1 compiler

    I am trying this on sol10 host:
    Solaris 10 10/08 s10s_u6wos_07b SPARC
    Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 27 October 2008
    Here is my script that I run to start configure:
    #!/bin/ksh
    pwd=`pwd`
    LD_LIBRARY_PATH=${pwd}/build_unix/.libs
    uname=$(uname -p)
    CFLAGS="-m64 -D_HAVE_SQLITE_CONFIG_H -I${pwd}/sql -I/usr/java/include -I/usr/java/include/solaris"
    CXXFLAGS="-m64 -library=stlport4"
    CPPFLAGS="-m64 -DSQLITE_ENABLE_RTREE -I${pwd}/sql -I/usr/java/include -I/usr/java/include/solaris"
    LDFLAGS="-m64 "
    CC=/import/datools/vendor/sun/${uname}/studio12u1/bin/cc
    CXX=/import/datools/vendor/sun/${uname}/studio12u1/bin/CC
    export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS CC CXX
    ../dist/configure prefix=/import/pdtools/external/db-5.0.26.NC exec-prefix=/import/pdtools/external/db-5.0.26.NC/${uname} enable-cxx enable-sql enable-sql_compat enable-tcl
    with-pic with-tcl=/import/pdtools/external/tcl-8.5.8/${uname}/lib -enable-java enable-jdbc enable-stl
    Here is the error given by the configure script at the end:
    checking whether the C++ compiler supports templates for STL... configure: error: no
    Let me how to add the config.log file and I can attach that here as well.

    I am able to get past the configure step using studio12u2 compiler. Now the build fails with the following message:
    libtool: compile: /import/datools/vendor/sun/sparc/studio12u2/bin/CC -c -I. -I../dist/.. -m64 -DSQLITE_ENABLE_RTREE -I/import/cad/tools/src/db-5.0.26.NC/build_unix/sql -I/usr/java/include -I/usr/java/include/solaris -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/bin/../java/include -I/usr/bin/../java/include/solaris -m64 -library=stlport4 -I../dist/../stl ../dist/../stl/dbstl_container.cpp -KPIC -DPIC -o .libs/dbstl_container.o
    "../dist/../stl/dbstl_exception.h", line 168: Error: The function "strlen" must have a prototype.
    "../dist/../stl/dbstl_exception.h", line 169: Error: The function "strlen" must have a prototype.
    "../dist/../stl/dbstl_exception.h", line 183: Error: The function "strlen" must have a prototype.
    "../dist/../stl/dbstl_exception.h", line 184: Error: The function "strcpy" must have a prototype.
    "../dist/../stl/dbstl_exception.h", line 188: Error: The function "free" must have a prototype.
    "../dist/../stl/dbstl_utility.h", line 445: Error: The function "memcpy" must have a prototype.
    "../dist/../stl/dbstl_utility.h", line 473: Error: The function "memcpy" must have a prototype.
    "../dist/../stl/dbstl_utility.h", line 485: Error: The function "free" must have a prototype.
    "../dist/../stl/dbstl_utility.h", line 486: Error: The function "memset" must have a prototype.
    "../dist/../stl/dbstl_container.cpp", line 44: Error: The function "realloc" must have a prototype.
    "../dist/../stl/dbstl_container.cpp", line 56: Error: The function "malloc" must have a prototype.
    "../dist/../stl/dbstl_container.cpp", line 177: Error: The function "rand" must have a prototype.
    "../dist/../stl/dbstl_container.cpp", line 243: Error: The function "strcmp" must have a prototype.
    "../dist/../stl/dbstl_container.cpp", line 247: Error: The function "strcmp" must have a prototype.
    "../dist/../stl/dbstl_container.cpp", line 262: Error: The function "strcmp" must have a prototype.
    "../dist/../stl/dbstl_container.cpp", line 272: Error: The function "memcmp" must have a prototype.
    "../dist/../stl/dbstl_container.cpp", line 280: Error: The function "memcmp" must have a prototype.
    17 Error(s) detected.
    gmake: *** [dbstl_container.lo] Error 1

  • Unable to Detach Database in a Compiled Project - Labview 7.1

    We have recently left our customer, running a compiled version Labview 7.1 project. Since running the compiled project he cannot perform his Historical Data Back-up. The following error is reported:
    "This operation cannot be completed because the resource is in use by another Client
    Archive 09Sep08 (archive name) - Failed to detach associated relational database"
    Any guidance and advice would be greatly appreciated

    Hello Neil,
    I have had a look at other instances where we have come across a similar issue. Here is some information that I found:
    Microsoft's ActiveX Data Objects (ADO) are used for accessing data sources. They provide a means of accessing data stores. Although your program runs quite quickly, there must be an ADO connection in the background still running, and the connection does not get closed until some timeout occurs within ADO so that you can have access.
      The short-term workaround might be to wait an extra minute or so before detaching the database in your code.
    I hope that this will help,
    Please do let me know how it goes,
    Kind Regards,
    Michael S.
    Applications Engineer
    NI UK & Ireland

  • Unable to locate the Pro Cobol Compiler

    I'm installed Oracle 9i client using Oracle 9.2.0.2.0 for HP-UX.
    The Pro Cobol compiler is not present in any of the installation options.
    Where can I download Oracle Pro Cobol compiler for Oracle 9.2.0.2.0 for HP-UX?
    G-

    after some research I found out that the Pro Cobol compiler is not available on the HP Itanium for version 9.2.0.1, 9.2.0.2 and 9.2.0.3. I will not be available until 9.2.0.4 or later per Oracle on Metalink

  • [SOLVED] Gnome Shell 3.4.1: Unable to prevent dynamic workspaces

    I am trying to turn off dynamic workspaces and set a permanent number (6) as is supposedly possible since 3.4.
    Using dconf, I turn the following setting to 'false':
    /org/gnome/shell/overrides/dynamic-workspaces
    and enter '6' in to the following setting:
    /org/gnome/desktop/wm/preferences/num-workspaces
    The '6' is then immediately changed back to however many workspaces the 'dynamic' setting has created at the moment.
    Bizarrely, 'overriding' effect does not occur if I change the number when 'dynamic-workspaces' is set to true. Whenever it is set to false, Gnome changes the 'num-workspaces' setting to reflect current realities.
    Regardless of settings, the way it works is still 'dynamic' [grumble]worst.use.of.that.word.ever....[/grumble]
    Is this a bug? Or am I just not getting it right?
    (As a side note,  the frippery static extension thing is currently uninstallable)
    EDIT: If I try to set the number of workspaces far above what the current number is, I can see the number going down one-by-one. This would seem to indicate that the window manager is killing them off one after the other, as they aren't occupied. In other words, it's not that the new value is rejected out of hand. It's just that the WM still works dynamically.
    Last edited by madchine (2012-06-15 12:57:35)

    [root@swanepoel ~]# pacman -Qi gnome-shell
    Name : gnome-shell
    Version : 3.4.1-3
    URL : http://live.gnome.org/GnomeShell
    Licenses : GPL2
    Groups : gnome
    Provides : None
    Depends On : caribou folks gcr gjs gnome-bluetooth gnome-desktop
    gnome-menus libcroco libpulse mutter nautilus
    networkmanager telepathy-logger telepathy-mission-control
    unzip
    Optional Deps : network-manager-applet: shell integration for networkmanager
    Required By : None
    Conflicts With : None
    Replaces : None
    Installed Size : 6044.00 KiB
    Packager : Ionut Biru <[email protected]>
    Architecture : x86_64
    Build Date : Fri May 4 18:19:35 2012
    Install Date : Tue Jun 12 16:18:48 2012
    Install Reason : Explicitly installed
    Install Script : Yes
    Description : The next generation GNOME Shell
    see the man page for dconf for resetting. I 'm sure you can find it.

  • Unable to prevent Price change for Outline Agreement

    Dear Experts,
    Once Outline Agreement is generated in SAP, I do not want to allow users to change the price.
    I have tried with " Field Selection at Document level" using ME32-Change outline agreement field selection.
    I select "Quantity and Price" and select check box Display for  "Price and Price Unit",Price Date", "Condition Group".
    This will not allow price change at item details level (field grayed out) but user can still select Item condition (for Example PB00) and change the price there.
    Is there any solution for this ?
    Ideally I want to do this for a particular Document type of Outline Agreement only.
    Thanks and Best Regards,
    Raju

    Hi Ramki,
    Thnka s for you reply.
    This is not the desired solution. I can not ask Client to change to create different uses for create and change .
    In the buinsess process , mostly create an change users are same for outline agreements.
    I do not wna to restrict by User Authorization either as this is also not a 100% solution.
    Still  looking at configuration level only to restrict changes in Pricing for outline agreements.
    Regards,
    Mitesh Desai

  • Unable to prevent Time Machine backing up volume mounted from sparsebundle

    I have a password-protected sparsebundle that contains my financial files, private data, etc, which I mount as a volume at startup. It's about 8GB. If I'm going to be away from my computer for a bit, I'll unmount the volume as an extra security measure.
    I don't need or want Time Machine to back up the files INSIDE the volume, just the sparsebundle itself. If I needed to access a backup of a file inside the volume, I'd rather just pull up an earlier version of the sparsebundle, mount it, and find the file in there.
    However, I've recently discovered that I can't exclude the mounted volume from Time Machine backups in the usual way - the volume name is greyed out when I go through the System Preferences/Time Machine pane, and won't let me select it to be excluded from backup.
    So what's happening is that TM is backing up the contents of the volume, which is showing up as folders on the TM backup drive. Inside these folders is the complete listing (and actual data) of all the files in my secured volume!
    Even if I UNmount the volume from my system, it's still possible to access the data via Time Machine.app (and via Finder, on the TM backup disk).
    So, essentially, even though I've password protected the sparsebundle CONTAINING the data, all a person needs to get the data is to have access to my user account on my Mac, and they can get the data via the above methods.
    Is there any way to allow TM to back up the sparsebundle itself, but not the listing of the contents (and data) of the mounted image?
    It seems odd that I can exclude the volume contents from being indexed by Spotlight, but can't exclude them from being specifically backed up by Time Machine.
    Thanks in advance for any assistance!

    I have exactly the same issue. I cannot exclude the content of mounted disk images from my backup using the GUI (strangely on my other computer the content is not backuped).
    I have manually edited with a text editor the preference file (Library/Preferences/com.apple.TimeMachine.plist) today (I am using 10.6.3) and added in the SkipPaths section the mounting point of the disk image (typically /Volumes/NameofDisk ). So far so good. The corresponding folder appears in the backup but is empty.
    Use at your own risk

  • Unable to prevent backscatter with Exchange 2013

    Hi, 
    From my research, it seems that Exchange 2013 might have an inherent flaw (although I hope I am wrong). 
    Unlike all previous versions of Exchange, the 'Filter recipients who are not in the Directory' feature doesn't work the same. 
    Exchange 2013 seems to check the recipient only after getting the message. 
    mail from:<[email protected]
    250 2.1.0 Sender OK 
    rcpt to:<[email protected]
    250 2.1.5 Recipient OK 
    data 
    354 Start mail input; end with <CRLF>.<CRLF> 
    Write some Text Here 
    550 5.1.1 User unknown 
    And here is Exchange 2010 for example: 
    mail from:<[email protected]
    250 2.1.0 Sender OK 
    rcpt to:<[email protected]
    550 5.1.1 User unknown 
    This is rather a big problem, because it means that every Exchange 2013 installation is just sitting and waiting to be abused with backscatter spam, and unlike previous incarnations of Exchange, there is nothing that can be done about it. Once an Exchange 2013
    server has been abused with backscatter spam, its outgoing IP addresses will become blacklisted very quickly. 
    The only possible solutions I've found seem to require multiple server configurations and big complexity. 
    What can be done about this?

    Hi Chukee1,
    This is a known issue in Exchange 2013, as a workaround for this issue, you can enable recipient filter on Edge server.
    http://technet.microsoft.com/en-gb/library/bb123891%28v=exchg.150%29.aspx
    Here is a similar thread for your reference.
    http://social.technet.microsoft.com/Forums/en-US/75bb174e-a4b9-4d8e-9d8e-5d4d5bc32dc3/exchange-2013-backscatter-issue-recipient-validation-without-edge?forum=exchangesvrsecuremessaging
    Hope this is helpful to you.
    Best regards,
    Belinda Ma
    TechNet Community Support

  • Unable to prevent FF 3.6.14 from prompting to remember passwords

    Brand new new computer with Win7 Ultimate x64. Installed FF and unchecked option to prompt/remember website passwords...like I've done with MANY other FF installations.
    FF keeps prompting to remember website passwords and that check mark keeps reappearing!.
    Have uninstalled FF plus profile then reinstalled to no avail.
    I'm stumped and need some suggestions.
    Thanks
    Mark

    Firefox 3.6.16 is at http://www.mozilla.com/en-US/firefox/all.html
    Which can be found by way of
    www.mozilla.com -> [http://www.mozilla.com/en-US/firefox/all.html All Systems & Languages] -> [http://www.mozilla.com/en-US/firefox/all-older.html Firefox 3.6.16] on right.

  • Preventing the compilation of included .jsps

    Hi,
              I am using WLS 5.1sp9
              We have the constraint of compiling our .jsps when weblogic is started, not
              at request time. And we need to use the include directive for some of the
              .jsps, as the included
              .jsps contains references to objects that are declared in the includeing
              .jsp, our included
              .jsps do not compile and that stucks weblogic initialization.
              Here is a simple example:
              a.jsp
              <% int toto = 123; %>
              <%@ include file="includes/myInclude.jsp"%>
              myInclude.jsp
              <b> <%= toto%><b>
              Of course myInclude.jsp cannot be compiled on its own, so we named it
              myInclude.inc, which works but is unelegant.
              Is there a way to still give the .jsp extension to the included file but
              prevent it from being
              compiled by WLS ?
              Cheers,
              Marc.
              

              No. Nothing more elegant that naming them .inc.
              Mike
              "Marc-Andre Fontaine" <[email protected]> wrote:
              >Hi,
              >I am using WLS 5.1sp9
              >We have the constraint of compiling our .jsps when weblogic is started,
              >not
              >at request time. And we need to use the include directive for some of
              >the
              >..jsps, as the included
              >..jsps contains references to objects that are declared in the includeing
              >..jsp, our included
              >..jsps do not compile and that stucks weblogic initialization.
              >
              >Here is a simple example:
              >a.jsp
              >....
              ><% int toto = 123; %>
              ><%@ include file="includes/myInclude.jsp"%>
              >....
              >----
              >myInclude.jsp
              >....
              ><b> <%= toto%><b>
              >....
              >
              >Of course myInclude.jsp cannot be compiled on its own, so we named it
              >myInclude.inc, which works but is unelegant.
              >Is there a way to still give the .jsp extension to the included file
              >but
              >prevent it from being
              >compiled by WLS ?
              >
              >Cheers,
              >Marc.
              >
              >
              

Maybe you are looking for

  • OIM 11g r1 custom field in simple user search result

    Good morning, i need to visualize a custom field in the OIM simple user search result table. At the moment, when a simple user search is performed, the returned attribute is only the "Display Name". For the advanced user search result table, is possi

  • Questions on 2D

    Hi All This is a pretty all encompassing question... I am scheduled to do some work soon on producing a 2D viewing application for seismic analysis. We'll basically be taking 3 and 4 dimensional lumps of data and cutting two dimensional planes throug

  • Noobie in need of help STAT!

    I created a little website and when I look at it in IE7 it's ok, but in FireFox 2.0 it's all finked up....I don't have Safari so I have no clue how it looks in that.... Would someone please give me some idea what is wrong... http://www.theclownship.c

  • Partition in hard disk

    i'm new in using mac book pro.. i'm wondering,, do i have to do partition in my hard disk? like when using windows? thx be4

  • How to unlock ipod touch without computer?

    so i put a password on my ipod touch and forgot the password and disabled it and dont have itunes on my computer