bugGNU TeXmacs - Bugs: bug #16070, compilation fails with g++ 4.1

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #16070: compilation fails with g++ 4.1

Submitter:  Ralf Treinen <treinen>
Submitted:  Sun 12 Mar 2006 10:14:38 AM UTC
   
 
Category:  Compilation Priority:  5 - Normal
Item Group:  Error Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Martin Michlmayer Open/Closed:  Closed
Release:  None Release:  1.0.6
Fixed Release:  None Fixed Release: 
Keywords:  compilation

Tue 13 Mar 2012 11:11:48 AM UTC, comment #5: 

This bug seems not more relevant. TeXmacs compile fine on g++ 4.2.1. Close. Please reopen if you can reproduce it in recent releases.

Massimiliano Gubinelli <mgubi>
Group administrator
Fri 12 May 2006 09:05:03 PM UTC, comment #4: 

The attached patch is required additionally to the one I previously submitted to compile TeXmacs 1.0.6.1 with G++ 4.1.

Invalid User ID <#48748>
Sun 16 Apr 2006 10:02:57 PM UTC, comment #3: 

Hi,

attached is a patch that makes Texmacs fully compile and run on GCC 4.1.

The most common problem is that the code relies on the fact that declaring a method or a class as "friend" establishes the name in  the surrounding namespcae. This is clearly not the case as by ISO    C++ and GCC 4.1 seems to respect this, while GCC 4.0 does not. Adding prototypes approprietly helps.

I am a bit curious about the changes in basic_widget.c though. There is no single "operator << (ostream, event)" definition in the whole source code, so I did what "operator << (widget, event)" does, by doing "cout << (tree)ev" instead of "cout << ev". "operator << (ostream, tree)" is defined and seems to do sensible things for this case. Better review it. ;-)

René

Invalid User ID <#48748>
Sat 18 Mar 2006 01:00:44 PM UTC, comment #2: 

this patch fixes this particular bug but then you get more of a similar nature.

Martin Michlmayr <tbm>
Sat 18 Mar 2006 07:09:22 AM UTC, comment #1: 

It's a bug in your software, not in G++.  Otherwise I wouldn't have filed a bug against texmacs...

In standard C++, friend functions that are only declared inside a class can only be found by argument-dependent lookup (and can only be defined inline, though it's not a syntax error to fail to do so!)

Martin Michlmayr <tbm>
Sun 12 Mar 2006 10:14:38 AM UTC, original submission:  

Compilation with gcc/g++ 4.1 fails with the following error message:

System/Classes/url.hpp: In function 'url url_none()':
System/Classes/url.hpp:60: error: 'as_url' was not declared in this scope
System/Classes/url.hpp: In function 'url url_here()':
System/Classes/url.hpp:61: error: 'as_url' was not declared in this scope
System/Classes/url.hpp: In function 'url url_parent()':
System/Classes/url.hpp:62: error: 'as_url' was not declared in this scope

This is version 4.1.0 of g++ (final release)

I do not understand the C++ object system sufficiently well to tell whether this is a bug of texmacs or of g++. It seems that
g++ 4.1 is stricter than g++ 4.0 in various respects, but I
couldn't find anything useful on this subject on http://gcc.gnu.org/gcc-4.1/changes.html

-Ralf.



Ralf Treinen <treinen>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #1506:  p added by tbm (279B - application/octet-stream - fix as_url not in scope error)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mgubi (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-03-13 mgubi Open/ClosedOpen Closed
    2006-05-12 #48748 Carbon-CopyRemoved -email is unavailable- -
    2006-05-12 #48748 Attached File- Added change_boxes.cpp.diff, #9955
    2006-04-22 ehmsen Carbon-Copy- Added -email is unavailable-
    2006-04-16 #48748 Attached File- Added texmacs-gcc-4.1.diff, #9792
        Carbon-Copy- Added -email is unavailable-
    2006-03-18 tbm Attached File- Added p, #3507
    2006-03-18 tbm Carbon-Copy- Added tbm

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code