Inaccurate line number in C++ warning message

Compiling the following code snippet with SS11 or SS12 C++ compiler creates a warning which obviously carries wrong or inaccurate line number information:
# cat warn.C
class Test {
  public:
    Test(int);
    int var1;
Test::Test(int var1) {
//             ^^^^
   this->var1 = var1;
// and now, for something completely different...It says:
# CC -c warn.C
"warn.C", line 13: Warning: var1 hides Test::var1.
1 Warning(s) detected.line 13 is the comment at the end of the file. The right line would probably be 7 (as marked by ^^^^).
I know that it's just a warning, but it should be accurate though.
Thanks,
Jochen

Yes, the compiler should do better in providing the line number.
Please file a bug report on the C++ compiler at
[http://bugs.sun.com]

Similar Messages

  • Transaction Notification to show 'Line Number' in the Error message

    HI guys
    I been trying to get this line no. to be shown in the error message, have not tried that, is this possible?
    i did  a Notification to check on the line level, however, due to many line items, user has to check one by one, is that any way to tell user which line is having the problem
    EM, Cheers

    Hi,
    Check this document:
    How to close a discussion and why
    Thanks & Regards,
    Nagarajan

  • OracleSOA - File Adapter - Correct mechanism to get the line number from the file

    We are using Oracle SOA process to read data from a file, process the data and write it to the database. SOA process is created using Oracle File Adapter to read the data, Oracle BPEL to transform & process the data and Oracle DB Adapter to write the data into the database.
    Oracle File Adapter uses native schema to process the fixed length data in the file. The number of rows in the file may exceed more than 500,000, to support processing of large files we use chunk size in the file adapter as 4000 rows. In each read operation, file adapter reads the data that matches to the schema, there might be few rejected rows as well.
    Oracle File Adapter property - jca.file.LineNumber gives me only the line number till what line the data is read. Is there any way to get the line number in the xml message, which exactly matches to the line number in the file.?
    Flat File Format: (Every file has one header, trailer and multiple data lines),
    HEADER02 -
    L01
    L01
    L01
    TRAILER02
    Line number is one of the crucial requirement in the development of the SOA service, this is used to back trace the information from which source and line the data has come.

    Hi Anshul,
    Thanks for sharing your thoughts.
    I am using DB adapter to insert the data into db.
    While doing the xsl transformation I can get the index of the message using position(), but that is not the correct way as there can be rejected lines by the file adapter.
    Even if I maintain a local counter variable, it will not consider rejected lines and increment that, which is not correct.
    Thanks,
    Ravindra

  • Warning message display for Price check-Sale order creation

    Hi,
    While creating sales order at line item level a warning message is required to pop-up after validating if the sale order line item's Net Price = Gross Price.
    1.Is there any IMG customization that can be done to acheive this? If Yes, how??
    2.If it can be done only by adding a required message to message class, could you pls tell me the form which may require modification??
    Thanks

    Hi,
    Develope the logic in any of the following userexits avaialble in the program-
    MV45AFZB
    MV45AFZB
    The requirement cannot be processed through Standard SAP behaviour.
    Regards
    Goutham

  • Line number in PL/SQL

    Hi,
    I want to know the line number in a function where the error has occured.
    I have catched that exception but how could i be able to get the line number along with error message.
    Thanks,
    santhosh

    One technique that is fairly common is to use v_loc and number it every 10 in increments. That's not line by line, but block or code section of interest within a procedure/function. When you hit an error, the output can not only output the program name (name of the procedure, as an example, within a package), but also where you were last good in terms of not having an error. In other words, you can see that you made it to location 40 (out of 50) within the current program. General description of this is instrumentation, and there are many ways to instrument code.
    Line by line is impractical. Code will fail at the statement level (after compiling) and the line that is output can be far away from where the mistake took place.

  • Warning Message in query result as 'Notification Number DBMAN 345'

    Hi ,
    I have a warning message while executing the query
    'Diagnosis
    Currently, it cannot be guaranteed that SIDs and master data exists for all characteristic attributes for the DataStore object to be read.
    There is a restriction on a navigation attribute of the listed characteristic in the query. This filters all characteristic values of the master-data bearing characteristic for which there is not yet master data out of the result.
    For performance reasons, this filtering is unavoidable.
    System Response
    Procedure
    In case of doubt, find other restirctions directly on the characteristic values of the characteristics contained in the DataStore object.
    Procedure for System Administration
      Notification Number DBMAN 345  '
    'i am getting this error because of cutomer exit variables  on navigatioanl attributes of  Omaterial'
    I tried supressing it in  RSRT.. but unable to find the message.
    I tried  debugging and assigning enhancement points in  FM  BAL_LOG_MSG_READ.. As it is standard function module its not suggestable to do..
    can we creat custom FM ?? will it be called if we  write code to supress warning message??
    Please let me know how to use  BADI'S  in order to supress the error message that appearing in query result?
    Thanks All.

    Hi,
    The warning is raised due to the following reasons:
      - you have a selection in the filter of a navigation attribute
      - in your DSO you do not use the option "SIDs Generation upon Activation"
    If the option "SIDs Generation upon Activation" is not flagged,
    you may get char.values for an Infoobject in the system not
    having any SIDs. As a result you may see in the report less data as
    expected.
    For example we have Infoobject A with its Nav.attribute B
      Infoobject A   Nav.attribute B
      12             13   ->> has a SID in the X-table
      11             10
      9              13   ->> has no SID in the X-table
    If you define a selection on B =13 in the query, you only get infoobject
    A with key 12 displayed in the result, since only B =13 has a SID
    in the relevant X-table.
    The warning refers to this behaviour and cannot be avoided unless you:
       - flag the option in the ODS-settings
       - or remove the filter defined on 0MATERIAL__xxxx
    Thanks,
    Venkat

  • How to show warning message in two Lines.

    Hi,
    Can some one please let me know how to show a warning message in two lines. I have created a Message in EBS in two lines but it still displays on the page in a single line.

    use bundled exception.
    ArryList peerExceptions = new ArrayList();
    peerExceptions.add(new OAException(....));
    peerExceptions.add(new OAException(....));
    OAException.raiseBundledOAException(exceptions);
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • The error message: SE 337 Please enter a line number.

    Dear Experts,
    We have a PO that can not be transferred to P1 because of the error message:
    SE 337 Please enter a line number.
    We tried to checked the transfer of the PO.
    The error message came from the Backend Function BBP_PO_INBOUND.
    But it is not possible to define the exact cause of the issue (the exact transfer parameter) due to missing RFC authorization.
    The following changes were made in the PO (PO already mapped in Backend) after that PO cannot be transferred:
    - a deleted item was set back
    - WBS Element was changed
    Thank you in advance.
    Best regards
    Evgeny

    Hello Evgeny,
    Whenever you create a  PO in SRM irrespective of number of the
    line items chosen, in the backend system this PO will contain
    a single line item in the Item section.
    If you delete all the line items in the PO and
    attempt to undelete them the undeletion will not work since the PO is already
    considered to be deleted in the backend.
    Please try delete and undelete a individual line item
    in a PO provided there is at least one item which is not deleted.
    hope this helps
    Daniel

  • Conversion of Warning Message to Error Message Message Number 06152 in ME51

    HI,
    User has created the PR(ME51N) and Buyer has created the PO (ME21N) against this PR.
    User are able to delet the line with following warning message.
    *Purchase orders already exist for this item*
    *Message no. 06152*
    I have stried to change this warning message to error messge form following path
    IMG-MM-Purchsing-Environment data------- But the message is not appearing in this table.
    How can i change this warning message to error message ?
    Thanks
    Shyam Kogta
    09871894536

    Hello,
    In the same IMG path (IMG->MM->Purchsing->Environment data->Define Attributes of System Messages), click 'New Entries' and enter the message with Message category 'E'.
    Thanks,
    Venu

  • Warning message Number V1501

    Dear All,
    I am creating an order with reference to a Quantity contract. When I can change the quantity in sales order greater then the Quantity contracts quantity, system issues the warning message Number V1501. Does any one know how we can change the warning message to an error message in R/3? 
    I have checked in the IMG but unable to find any customizing node. Please advice me in this regard.
    thanks!

    Try with OVAH else
    Purchasing, the path to maintain warning & error messages
    Material Management->Purchasing->Environment Data->Define Attributes of System Messages
    In case of Inventory Management     
    Material Management->Inventory Management and Physical Inventory->Define Attributes of System Messages
    In case of External Service Management     
    Material Management->External Services Management->Define Attributes of System Messages
    In case of Logistics Invoice verification     
    Material Management->Invoice Verification->Logistics Invoice Verification->Define Attributes of System Messages
    In case of Material Master     
    Logistics - General->Material Master->Basic Settings->Define Attributes of System Messages
    Regards

  • Since update message "XML Parsing Error: undefined entity Location: chrome://browser/content/browser.xul Line Number 238, Column 5:" Tried everything - help!

    Since an automatic update ran I get the message <br />
    "XML Parsing Error: undefined entity <br />
    Location:chrome://browser/content/browser.xul <br />
    Line Number 238, Column 5: <br />
    <broadcaster id="devtoolsMenuBroadcaster_ChromeDebugger"----^"<br />
    when I try to open Firefox. I have had to go back to using Internet Explorer - Tried everything suggested including deleting then reinstalling Firefox, but still cannot get Firefox to open - help!

    Hello,
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default (your profile folder with bookmarks etc. WILL NOT BE DELETED):
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!
    Thank you.

  • Reset file name and line number in preprocessor

    We are using Sun Studio 12u1 on Solaris x86 10u9.
    For one of our large projects our make file copies many C++ source files into one large allsource.cpp file. This results in significantly faster compilation and better inter-procedural optimizations.
    Unfortunately, when the compiler generates warning or error messages they refer to allsource.cpp. Also when it comes time to debug, dbx is looking for debugging information for the original source file instead of looking for allsource.o.
    On Windows (MSVC), we use the #line directive to reset the line number and filename so that the error messages point to the correct line and number, and so that the debugger knows that the debugging information for myfile.cpp is actually in allsource.o.
    Does the Sun compiler have anything similar to the #line directive?

    To reset the preprocessor to the start of a new file:
    #1 "filename"
    where filename is the name or complete path name of the file.
    To change the line number within the current file:
    #N
    or
    #line N
    where N is an integer
    Example:
    % cat z.cc
    struct S { X x; };
    #1 "/foo/bar.h"
    Int I;
    #500
    Float F;
    #line 1000
    Double D;
    88% CC -c z.cc
    "z.cc", line 1: Error: Type name expected instead of "X".
    "/foo/bar.h", line 1: Error: Int is not defined.
    "/foo/bar.h", line 500: Error: Float is not defined.
    "/foo/bar.h", line 1000: Error: Double is not defined.
    4 Error(s) detected.BTW, you might get a similar improvement in compile time by using precompiled headers.
    The -xipo option provide inter-procedural optimization across compilation units. Refer to the C++ Users Guide for details.
    We seem to have a bug in the Forum software. My original source code and the compiler output have double quotes ("...") but they show as single quotes in the code brackets.
    Edited by: clamage45 on Apr 13, 2010 1:13 PM

  • Warning messages in mapping deployment window

    Hi all,
    After deploying a mapping I got several warning messages but have no clues as to what and where they are referring to. Example of a warning message that I got:
    ORA-06550: line 32250, column 11:
    PL/SQL: SQL Statement ignored
    Do anyone of you know where the line 32250 and column 11 is exactly referring to? I need to see the code in order to know wat's the error. Do I refer to the script in the Script tab? But it seems to refer to nowhere if that is the case...

    Sutirtha Roy wrote:
    Hi ,
    The line numbers in the error messages are usually offset from the start of the package body, but the generated code listing has the package spec and body. So for example you got this one:
    LINE 671 ,COLUMN 12:
    PL/SQL: ORA-00942: table or view does not exist
    So you want to find package body line 671. So inside the generated code viewer, find the text "CREATE OR REPLACE PACKAGE BODY". Note the line number where that occurs, then add it to 671, that should be your actual line number.
    Thanks,
    SutirthaThanks Sutirtha,
    I finally made sense of where the warning messages were referring to. But I could not understand why some of these messages were produced. The scenario is like this.
    I added a unique key constraint on the attribute suppcode in the supplierwh table, and for all instances of this supplierwh table in my mapping where the loading type is "Update", I set the loading properties for both "match column when updating" and "match column when deleting" to No. Validation has got no errors but upon deployment warning messages were produced. Half of these warning messages were of this type:
    Warning
    ORA-06550: line 2449, column 41:
    PL/SQL: ORA-00936: missing expression
    Upon checking where these similar type of warning messages were referring to, all of them were pointing to codes something like below:
    "MERGE_SUBQUERY"
    ON (
    *"T_SUPPLIERWH_T1UPDATE"."SUPPCODE" = AND*
    "T_SUPPLIERWH_T1UPDATE"."SUPPKEY" = "MERGE_SUBQUERY"."SUPPKEY_1"
    I believe the error codes are the ones in bold because there is nothing after the = sign. But I do not understand why this is so. Can anyone help?
    Edit: I think I found the reason to this. Is it because of the "match by constraint" attribute? What does this attribute do when set to "All constraints"?
    Edited by: user8915380 on 29-Apr-2010 01:38

  • Warning Message:- Field BRSCH from structure CUSTOMER-CENTRAL_DATA-CENTRAL-DATA is provided by Business partner

    Hi Experts,
    I get this error when replication the Organization Unit created in transaction BP from CRM to ECC.
    The error is generated in ECC system and Error Class is CVI_EI.
    Any ideas.
    Kind Regards,
    Gaurav

    Hi Gaurav,
    The Business partner does not have 'industry Key' that is reason the warning msg is coming.
    BRSCH- Industry Field
    you can check this in structure 'CMDS_EI_VMD_CENTRAL_DATA ' which will be filled at run time and later validation happen in  Program 'Fill_customer_central' on it. You can set up breakpoint at line number 183 where the validation is failing and warning message is getting raised.
    Please assign point if above information helpful.:-)
    Thanks
    Prem

  • PO Number in Vendor Downpayment - Message Control

    Dears
    We have a requirement to enter the PO number in the line item while entering vendor down payment using F-48 transaction.
    We cannot make the PO order number in the F-48 mandatory. However, if the PO number is not entered by the user,
    a warning message should be issued to the user that PO number is not entered.
    Can we control it through changing message control ?
    Please advise.

    Hello Nikitha,
    You can achieve your requirement either through validation or with the help of creating the screen variant.
    Please check the below links which are helpful to resolve your issue.
    http://scn.sap.com/docs/DOC-29078
    http://scn.sap.com/docs/DOC-39405
    http://scn.sap.com/docs/DOC-46554
    Please check this and try accordingly. Revert us if you still face any issues.
    Thanks & Regards,
    Lakshmi S

Maybe you are looking for

  • Re: Macbook aluminium late 2008 updated to 10.6.7

    I have a Macbook Pro 2.53 GHz Intel Core 2 Duo and can only Boot with Safeboot since upgrading to 10.6.7. The only usable Web Browser is Firefox 3.6.16. I have tried reapplying the install from Safeboot and also removed any Anti-virus (primarily Syma

  • How do I clear the data in a waveform chart before running the vi?

    I'm sending data via TCP and I want to have the chart displaying the sent data clear itself when I start the VI. How can I do this?

  • How to Sort ArrayList

    Hi I have class like below , i store them in a ArrayList, is it possible to sort this ArrayList by name or by date. The class is as below public class MyInfo private String name; private Date date; //have getters and setters for name and date ArrayLi

  • With the new version of firefox am not able to open my outlook web access

    <blockquote>Locking duplicate thread.<br> Please continue here: [[/questions/914000]]</blockquote> while its working with IE message : the url is invalid and cannot be loaded . may coz i dont have valid ssl certificate but with previous version i did

  • Slideshow not showing landscape photos

    I am exporting a slideshow from iPhoto and it is not including the landscape photos, only the portrait photos. I have deleted iPhoto and re-installed it yet the problem persists. Any ideas?