public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Bug? Why __seg_fs __seg_gs are visible while compiling through gcc and not while compiling through g++ (error) even if the statements are enclosed in 'extern "C" {...}' statements
@ 2023-07-15 13:01 gkourtis
  2023-07-15 13:08 ` Xi Ruoyao
  2023-07-15 19:55 ` Jonathan Wakely
  0 siblings, 2 replies; 4+ messages in thread
From: gkourtis @ 2023-07-15 13:01 UTC (permalink / raw)
  To: gcc-help

I think there is some sort of bug !!!

When I compile throught gcc __seg_gs is visible, while if I use g++ it 
is not !!!

Should it be like that ?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug? Why __seg_fs __seg_gs are visible while compiling through gcc and not while compiling through g++ (error) even if the statements are enclosed in 'extern "C" {...}' statements
  2023-07-15 13:01 Bug? Why __seg_fs __seg_gs are visible while compiling through gcc and not while compiling through g++ (error) even if the statements are enclosed in 'extern "C" {...}' statements gkourtis
@ 2023-07-15 13:08 ` Xi Ruoyao
       [not found]   ` <c3afdfb9-dc97-76fc-b7c4-c762a84f33cb@freemail.gr>
  2023-07-15 19:55 ` Jonathan Wakely
  1 sibling, 1 reply; 4+ messages in thread
From: Xi Ruoyao @ 2023-07-15 13:08 UTC (permalink / raw)
  To: gkourtis, gcc-help

On Sat, 2023-07-15 at 16:01 +0300, gkourtis--- via Gcc-help wrote:
> I think there is some sort of bug !!!
> 
> When I compile throught gcc __seg_gs is visible, while if I use g++ it
> is not !!!
> 
> Should it be like that ?

https://gcc.gnu.org/PR69549

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug? Why __seg_fs __seg_gs are visible while compiling through gcc and not while compiling through g++ (error) even if the statements are enclosed in 'extern "C" {...}' statements
  2023-07-15 13:01 Bug? Why __seg_fs __seg_gs are visible while compiling through gcc and not while compiling through g++ (error) even if the statements are enclosed in 'extern "C" {...}' statements gkourtis
  2023-07-15 13:08 ` Xi Ruoyao
@ 2023-07-15 19:55 ` Jonathan Wakely
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2023-07-15 19:55 UTC (permalink / raw)
  To: gkourtis; +Cc: gcc-help

On Sat, 15 Jul 2023 at 14:02, gkourtis--- via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> I think there is some sort of bug !!!
>
> When I compile throught gcc __seg_gs is visible, while if I use g++ it
> is not !!!
>
> Should it be like that ?


Enclosing code in extern "C" does not magically change the compiler to
be a C compiler, it just tells the C++ compiler to use C-style symbol
names and calling conventions for functions. It doesn't mean you can
use features that are not supported by the C++ compiler, because
you're still just compiling C++ code.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug? Why __seg_fs __seg_gs are visible while compiling through gcc and not while compiling through g++ (error) even if the statements are enclosed in 'extern "C" {...}' statements
       [not found]   ` <c3afdfb9-dc97-76fc-b7c4-c762a84f33cb@freemail.gr>
@ 2023-07-16 13:28     ` Xi Ruoyao
  0 siblings, 0 replies; 4+ messages in thread
From: Xi Ruoyao @ 2023-07-16 13:28 UTC (permalink / raw)
  To: gkourtis; +Cc: gcc-help

On Sun, 2023-07-16 at 12:42 +0300, gkourtis@freemail.gr wrote:
> Thanks for pointing out the known problem.
> By the way what should I have done on my own to detect the "known
> issue" ?
> As I did various searches without any result !

Use the "search" box at https://gcc.gnu.org/bugzilla/.

> George
> 
> Στις 15/7/23 16:08, ο/η Xi Ruoyao έγραψε:
> > On Sat, 2023-07-15 at 16:01 +0300, gkourtis--- via Gcc-help wrote:
> > > I think there is some sort of bug !!!
> > > 
> > > When I compile throught gcc __seg_gs is visible, while if I use
> > > g++ it
> > > is not !!!
> > > 
> > > Should it be like that ?
> > https://gcc.gnu.org/PR69549
> > 
> 

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-16 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-15 13:01 Bug? Why __seg_fs __seg_gs are visible while compiling through gcc and not while compiling through g++ (error) even if the statements are enclosed in 'extern "C" {...}' statements gkourtis
2023-07-15 13:08 ` Xi Ruoyao
     [not found]   ` <c3afdfb9-dc97-76fc-b7c4-c762a84f33cb@freemail.gr>
2023-07-16 13:28     ` Xi Ruoyao
2023-07-15 19:55 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).